summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2011-04-07 23:28:32 +0000
committerJohn Mark Bell <jmb@netsurf-browser.org>2011-04-07 23:28:32 +0000
commit4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43 (patch)
tree545dfc0006eeddcd000a1071c7c62afe3e47e5b5 /src
parentd24960dac782ef8e54ed91692f6aec1dd6d08bc1 (diff)
downloadlibdom-4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43.tar.gz
libdom-4ade8ad1c7b23e6eeeee6681acbdb43fb10cab43.tar.bz2
s/struct dom_string/dom_string/g
svn path=/trunk/libdom/; revision=12172
Diffstat (limited to 'src')
-rw-r--r--src/core/attr.c20
-rw-r--r--src/core/attr.h17
-rw-r--r--src/core/cdatasection.c2
-rw-r--r--src/core/cdatasection.h4
-rw-r--r--src/core/characterdata.c22
-rw-r--r--src/core/characterdata.h14
-rw-r--r--src/core/comment.c2
-rw-r--r--src/core/comment.h3
-rw-r--r--src/core/doc_fragment.c2
-rw-r--r--src/core/doc_fragment.h3
-rw-r--r--src/core/document.c50
-rw-r--r--src/core/document.h54
-rw-r--r--src/core/document_type.c20
-rw-r--r--src/core/document_type.h18
-rw-r--r--src/core/element.c102
-rw-r--r--src/core/element.h59
-rw-r--r--src/core/entity_ref.c4
-rw-r--r--src/core/entity_ref.h5
-rw-r--r--src/core/namednodemap.c12
-rw-r--r--src/core/namednodemap.h13
-rw-r--r--src/core/node.c42
-rw-r--r--src/core/node.h46
-rw-r--r--src/core/nodelist.h1
-rw-r--r--src/core/pi.c2
-rw-r--r--src/core/pi.h3
-rw-r--r--src/core/string.c76
-rw-r--r--src/core/string.h8
-rw-r--r--src/core/text.c10
-rw-r--r--src/core/text.h9
-rw-r--r--src/core/typeinfo.c6
-rw-r--r--src/events/custom_event.c2
-rw-r--r--src/events/document_event.c4
-rw-r--r--src/events/event.c10
-rw-r--r--src/events/event_target.c10
-rw-r--r--src/events/event_target.h9
-rw-r--r--src/events/keyboard_event.c18
-rw-r--r--src/events/keyboard_event.h4
-rw-r--r--src/events/mouse_event.c6
-rw-r--r--src/events/mouse_multi_wheel_event.c6
-rw-r--r--src/events/mouse_wheel_event.c6
-rw-r--r--src/events/mutation_event.c18
-rw-r--r--src/events/mutation_event.h6
-rw-r--r--src/events/mutation_name_event.c14
-rw-r--r--src/events/mutation_name_event.h4
-rw-r--r--src/events/text_event.c10
-rw-r--r--src/events/text_event.h2
-rw-r--r--src/events/ui_event.c4
-rw-r--r--src/html/html_base_element.c4
-rw-r--r--src/html/html_base_element.h4
-rw-r--r--src/html/html_body_element.c4
-rw-r--r--src/html/html_body_element.h4
-rw-r--r--src/html/html_collection.c2
-rw-r--r--src/html/html_document.c20
-rw-r--r--src/html/html_document.h10
-rw-r--r--src/html/html_element.c4
-rw-r--r--src/html/html_element.h4
-rw-r--r--src/html/html_form_element.c4
-rw-r--r--src/html/html_form_element.h4
-rw-r--r--src/html/html_head_element.c4
-rw-r--r--src/html/html_head_element.h4
-rw-r--r--src/html/html_html_element.c4
-rw-r--r--src/html/html_html_element.h4
-rw-r--r--src/html/html_isindex_element.c4
-rw-r--r--src/html/html_isindex_element.h4
-rw-r--r--src/html/html_link_element.c4
-rw-r--r--src/html/html_link_element.h4
-rw-r--r--src/html/html_meta_element.c4
-rw-r--r--src/html/html_meta_element.h4
-rw-r--r--src/html/html_options_collection.c2
-rw-r--r--src/html/html_select_element.c4
-rw-r--r--src/html/html_select_element.h4
-rw-r--r--src/html/html_style_element.c4
-rw-r--r--src/html/html_style_element.h4
-rw-r--r--src/html/html_title_element.c8
-rw-r--r--src/html/html_title_element.h4
-rw-r--r--src/utils/namespace.c18
-rw-r--r--src/utils/namespace.h15
-rw-r--r--src/utils/resource_mgr.c4
-rw-r--r--src/utils/resource_mgr.h6
-rw-r--r--src/utils/validate.c4
-rw-r--r--src/utils/validate.h7
81 files changed, 469 insertions, 481 deletions
diff --git a/src/core/attr.c b/src/core/attr.c
index b280057..937eec0 100644
--- a/src/core/attr.c
+++ b/src/core/attr.c
@@ -396,7 +396,7 @@ void dom_attr_mark_readonly(dom_attr *a)
* finished with it.
*/
dom_exception _dom_attr_get_name(struct dom_attr *attr,
- struct dom_string **result)
+ dom_string **result)
{
/* This is the same as nodeName */
return dom_node_get_node_name(attr, result);
@@ -428,11 +428,11 @@ dom_exception _dom_attr_get_specified(struct dom_attr *attr, bool *result)
* finished with it.
*/
dom_exception _dom_attr_get_value(struct dom_attr *attr,
- struct dom_string **result)
+ dom_string **result)
{
struct dom_node_internal *a = (struct dom_node_internal *) attr;
struct dom_node_internal *c;
- struct dom_string *value, *temp;
+ dom_string *value, *temp;
dom_exception err;
err = _dom_document_create_string(a->owner,
@@ -469,7 +469,7 @@ dom_exception _dom_attr_get_value(struct dom_attr *attr,
/* Claim new value */
value = temp;
} else if (c->type == DOM_ENTITY_REFERENCE_NODE) {
- struct dom_string *tr;
+ dom_string *tr;
/* Get textual representation of entity */
err = _dom_entity_reference_get_textual_representation(
@@ -513,7 +513,7 @@ dom_exception _dom_attr_get_value(struct dom_attr *attr,
* DOM_NO_MODIFICATION_ALLOWED_ERR if attribute is readonly.
*/
dom_exception _dom_attr_set_value(struct dom_attr *attr,
- struct dom_string *value)
+ dom_string *value)
{
struct dom_node_internal *a = (struct dom_node_internal *) attr;
struct dom_node_internal *c, *d;
@@ -640,7 +640,7 @@ dom_exception _dom_attr_is_id(struct dom_attr *attr, bool *result)
/* Overload function of Node, please refer node.c for the detail of this
* function. */
dom_exception _dom_attr_get_node_value(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
dom_attr *attr = (dom_attr *) node;
@@ -674,7 +674,7 @@ dom_exception _dom_attr_clone_node(dom_node_internal *node, bool deep,
/* Overload function of Node, please refer node.c for the detail of this
* function. */
dom_exception _dom_attr_set_prefix(dom_node_internal *node,
- struct dom_string *prefix)
+ dom_string *prefix)
{
/* Really I don't know whether there should something
* special to do here */
@@ -684,7 +684,7 @@ dom_exception _dom_attr_set_prefix(dom_node_internal *node,
/* Overload function of Node, please refer node.c for the detail of this
* function. */
dom_exception _dom_attr_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result)
+ dom_string *namespace, dom_string **result)
{
struct dom_element *owner;
dom_exception err;
@@ -704,7 +704,7 @@ dom_exception _dom_attr_lookup_prefix(dom_node_internal *node,
/* Overload function of Node, please refer node.c for the detail of this
* function. */
dom_exception _dom_attr_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result)
+ dom_string *namespace, bool *result)
{
struct dom_element *owner;
dom_exception err;
@@ -724,7 +724,7 @@ dom_exception _dom_attr_is_default_namespace(dom_node_internal *node,
/* Overload function of Node, please refer node.c for the detail of this
* function. */
dom_exception _dom_attr_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result)
+ dom_string *prefix, dom_string **result)
{
struct dom_element *owner;
dom_exception err;
diff --git a/src/core/attr.h b/src/core/attr.h
index b94715a..0d4621a 100644
--- a/src/core/attr.h
+++ b/src/core/attr.h
@@ -11,7 +11,6 @@
#include <dom/core/attr.h>
struct dom_document;
-struct dom_string;
struct dom_type_info;
struct lwc_string_s;
@@ -28,12 +27,12 @@ void _dom_attr_finalise(struct dom_document *doc, struct dom_attr *attr);
/* Virtual functions for dom_attr */
dom_exception _dom_attr_get_name(struct dom_attr *attr,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_attr_get_specified(struct dom_attr *attr, bool *result);
dom_exception _dom_attr_get_value(struct dom_attr *attr,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_attr_set_value(struct dom_attr *attr,
- struct dom_string *value);
+ dom_string *value);
dom_exception _dom_attr_get_owner(struct dom_attr *attr,
struct dom_element **result);
dom_exception _dom_attr_get_schema_type_info(struct dom_attr *attr,
@@ -51,18 +50,18 @@ dom_exception _dom_attr_is_id(struct dom_attr *attr, bool *result);
/* Overloading dom_node functions */
dom_exception _dom_attr_get_node_value(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_attr_clone_node(dom_node_internal *node, bool deep,
dom_node_internal **result);
dom_exception _dom_attr_set_prefix(dom_node_internal *node,
- struct dom_string *prefix);
+ dom_string *prefix);
dom_exception _dom_attr_normalize(dom_node_internal *node);
dom_exception _dom_attr_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result);
+ dom_string *namespace, dom_string **result);
dom_exception _dom_attr_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result);
+ dom_string *namespace, bool *result);
dom_exception _dom_attr_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result);
+ dom_string *prefix, dom_string **result);
#define DOM_NODE_VTABLE_ATTR \
_dom_node_get_node_name, \
_dom_attr_get_node_value, /*overload*/\
diff --git a/src/core/cdatasection.c b/src/core/cdatasection.c
index b470df2..7417ebf 100644
--- a/src/core/cdatasection.c
+++ b/src/core/cdatasection.c
@@ -37,7 +37,7 @@ static struct dom_node_protect_vtable cdata_section_protect_vtable = {
* The returned node will already be referenced.
*/
dom_exception _dom_cdata_section_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_cdata_section **result)
{
struct dom_cdata_section *c;
diff --git a/src/core/cdatasection.h b/src/core/cdatasection.h
index 94d45a2..04a0954 100644
--- a/src/core/cdatasection.h
+++ b/src/core/cdatasection.h
@@ -10,15 +10,15 @@
#include <dom/core/exceptions.h>
#include <dom/core/cdatasection.h>
+#include <dom/core/string.h>
struct dom_node_internal;
struct dom_cdata_section;
struct dom_document;
-struct dom_string;
struct lwc_string_s;
dom_exception _dom_cdata_section_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_cdata_section **result);
void _dom_cdata_section_destroy(struct dom_document *doc,
diff --git a/src/core/characterdata.c b/src/core/characterdata.c
index 05d12ea..824e0dc 100644
--- a/src/core/characterdata.c
+++ b/src/core/characterdata.c
@@ -57,7 +57,7 @@ dom_characterdata *_dom_characterdata_create(struct dom_document *doc)
*/
dom_exception _dom_characterdata_initialise(struct dom_characterdata *cdata,
struct dom_document *doc, dom_node_type type,
- lwc_string *name, struct dom_string *value)
+ lwc_string *name, dom_string *value)
{
return _dom_node_initialise(&cdata->base, doc, type,
name, value, NULL, NULL);
@@ -97,7 +97,7 @@ void _dom_characterdata_finalise(struct dom_document *doc,
* this implementation; dom_strings are unbounded.
*/
dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata,
- struct dom_string **data)
+ dom_string **data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
@@ -122,7 +122,7 @@ dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata,
* a reference on the string). The node's existing content will be unrefed.
*/
dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata,
- struct dom_string *data)
+ dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
@@ -192,7 +192,7 @@ dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata,
*/
dom_exception _dom_characterdata_substring_data(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string **data)
+ unsigned long count, dom_string **data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
uint32_t len, end;
@@ -225,10 +225,10 @@ dom_exception _dom_characterdata_substring_data(
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::cdata is readonly.
*/
dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
- struct dom_string *data)
+ dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
- struct dom_string *temp;
+ dom_string *temp;
dom_exception err;
if (_dom_node_readonly(c)) {
@@ -271,10 +271,10 @@ 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, struct dom_string *data)
+ unsigned long offset, dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
- struct dom_string *temp;
+ dom_string *temp;
uint32_t len;
dom_exception err;
@@ -335,7 +335,7 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
unsigned long offset, unsigned long count)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
- struct dom_string *temp;
+ dom_string *temp;
uint32_t len, end;
dom_exception err;
@@ -397,10 +397,10 @@ dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
*/
dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata,
unsigned long offset, unsigned long count,
- struct dom_string *data)
+ dom_string *data)
{
struct dom_node_internal *c = (struct dom_node_internal *) cdata;
- struct dom_string *temp;
+ dom_string *temp;
uint32_t len, end;
dom_exception err;
diff --git a/src/core/characterdata.h b/src/core/characterdata.h
index b5886ea..da8772d 100644
--- a/src/core/characterdata.h
+++ b/src/core/characterdata.h
@@ -24,30 +24,30 @@ struct dom_characterdata {
dom_characterdata *_dom_characterdata_create(struct dom_document *doc);
dom_exception _dom_characterdata_initialise(struct dom_characterdata *cdata,
struct dom_document *doc, dom_node_type type,
- struct lwc_string_s *name, struct dom_string *value);
+ struct lwc_string_s *name, dom_string *value);
void _dom_characterdata_finalise(struct dom_document *doc,
struct dom_characterdata *cdata);
/* The virtual functions for dom_characterdata */
dom_exception _dom_characterdata_get_data(struct dom_characterdata *cdata,
- struct dom_string **data);
+ dom_string **data);
dom_exception _dom_characterdata_set_data(struct dom_characterdata *cdata,
- struct dom_string *data);
+ dom_string *data);
dom_exception _dom_characterdata_get_length(struct dom_characterdata *cdata,
unsigned long *length);
dom_exception _dom_characterdata_substring_data(
struct dom_characterdata *cdata, unsigned long offset,
- unsigned long count, struct dom_string **data);
+ unsigned long count, dom_string **data);
dom_exception _dom_characterdata_append_data(struct dom_characterdata *cdata,
- struct dom_string *data);
+ dom_string *data);
dom_exception _dom_characterdata_insert_data(struct dom_characterdata *cdata,
- unsigned long offset, struct dom_string *data);
+ unsigned long offset, dom_string *data);
dom_exception _dom_characterdata_delete_data(struct dom_characterdata *cdata,
unsigned long offset, unsigned long count);
dom_exception _dom_characterdata_replace_data(struct dom_characterdata *cdata,
unsigned long offset, unsigned long count,
- struct dom_string *data);
+ dom_string *data);
#define DOM_CHARACTERDATA_VTABLE \
_dom_characterdata_get_data, \
diff --git a/src/core/comment.c b/src/core/comment.c
index 564bcd8..ab49a66 100644
--- a/src/core/comment.c
+++ b/src/core/comment.c
@@ -38,7 +38,7 @@ static struct dom_node_protect_vtable comment_protect_vtable = {
* The returned node will already be referenced.
*/
dom_exception _dom_comment_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_comment **result)
{
struct dom_comment *c;
diff --git a/src/core/comment.h b/src/core/comment.h
index ef8791f..1951732 100644
--- a/src/core/comment.h
+++ b/src/core/comment.h
@@ -13,11 +13,10 @@
struct dom_comment;
struct dom_document;
-struct dom_string;
struct lwc_string_s;
dom_exception _dom_comment_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_comment **result);
#define _dom_comment_initialise _dom_characterdata_initialise
diff --git a/src/core/doc_fragment.c b/src/core/doc_fragment.c
index 6b46696..1d320b5 100644
--- a/src/core/doc_fragment.c
+++ b/src/core/doc_fragment.c
@@ -45,7 +45,7 @@ static struct dom_node_protect_vtable df_protect_vtable = {
* The returned node will already be referenced.
*/
dom_exception _dom_document_fragment_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_document_fragment **result)
{
struct dom_document_fragment *f;
diff --git a/src/core/doc_fragment.h b/src/core/doc_fragment.h
index 9d3de76..b2c3e71 100644
--- a/src/core/doc_fragment.h
+++ b/src/core/doc_fragment.h
@@ -12,11 +12,10 @@
struct dom_document_fragment;
struct dom_document;
-struct dom_string;
struct lwc_string_s;
dom_exception _dom_document_fragment_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_document_fragment **result);
void _dom_document_fragment_destroy(struct dom_document *doc,
diff --git a/src/core/document.c b/src/core/document.c
index 20ad789..b671c30 100644
--- a/src/core/document.c
+++ b/src/core/document.c
@@ -285,7 +285,7 @@ dom_exception _dom_document_get_document_element(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_element(struct dom_document *doc,
- struct dom_string *tag_name, struct dom_element **result)
+ dom_string *tag_name, struct dom_element **result)
{
lwc_string *name;
dom_exception err;
@@ -345,7 +345,7 @@ dom_exception _dom_document_create_document_fragment(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_text_node(struct dom_document *doc,
- struct dom_string *data, struct dom_text **result)
+ dom_string *data, struct dom_text **result)
{
lwc_string *name;
dom_exception err;
@@ -374,7 +374,7 @@ dom_exception _dom_document_create_text_node(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_comment(struct dom_document *doc,
- struct dom_string *data, struct dom_comment **result)
+ dom_string *data, struct dom_comment **result)
{
lwc_string *name;
dom_exception err;
@@ -405,7 +405,7 @@ dom_exception _dom_document_create_comment(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_cdata_section(struct dom_document *doc,
- struct dom_string *data, struct dom_cdata_section **result)
+ dom_string *data, struct dom_cdata_section **result)
{
lwc_string *name;
dom_exception err;
@@ -438,8 +438,8 @@ dom_exception _dom_document_create_cdata_section(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_processing_instruction(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result)
{
lwc_string *name;
@@ -472,7 +472,7 @@ dom_exception _dom_document_create_processing_instruction(
* finished with it.
*/
dom_exception _dom_document_create_attribute(struct dom_document *doc,
- struct dom_string *name, struct dom_attr **result)
+ dom_string *name, struct dom_attr **result)
{
lwc_string *n;
dom_exception err;
@@ -504,7 +504,7 @@ dom_exception _dom_document_create_attribute(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_entity_reference(struct dom_document *doc,
- struct dom_string *name,
+ dom_string *name,
struct dom_entity_reference **result)
{
lwc_string *n;
@@ -535,7 +535,7 @@ dom_exception _dom_document_create_entity_reference(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_get_elements_by_tag_name(struct dom_document *doc,
- struct dom_string *tagname, struct dom_nodelist **result)
+ dom_string *tagname, struct dom_nodelist **result)
{
lwc_string *name;
dom_exception err;
@@ -605,10 +605,10 @@ dom_exception _dom_document_import_node(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_element_ns(struct dom_document *doc,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_element **result)
{
- struct dom_string *prefix, *localname;
+ dom_string *prefix, *localname;
dom_exception err;
if (_dom_validate_name(qname) == false)
@@ -710,10 +710,10 @@ dom_exception _dom_document_create_element_ns(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_create_attribute_ns(struct dom_document *doc,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_attr **result)
{
- struct dom_string *prefix, *localname;
+ dom_string *prefix, *localname;
dom_exception err;
if (_dom_validate_name(qname) == false)
@@ -799,8 +799,8 @@ dom_exception _dom_document_create_attribute_ns(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_get_elements_by_tag_name_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result)
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result)
{
dom_exception err;
lwc_string *l = NULL, *n = NULL;
@@ -843,7 +843,7 @@ dom_exception _dom_document_get_elements_by_tag_name_ns(
* finished with it.
*/
dom_exception _dom_document_get_element_by_id(struct dom_document *doc,
- struct dom_string *id, struct dom_element **result)
+ dom_string *id, struct dom_element **result)
{
lwc_string *i;
dom_node_internal *root;
@@ -877,7 +877,7 @@ dom_exception _dom_document_get_element_by_id(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_get_input_encoding(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc);
UNUSED(result);
@@ -897,7 +897,7 @@ dom_exception _dom_document_get_input_encoding(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_get_xml_encoding(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc);
UNUSED(result);
@@ -957,7 +957,7 @@ dom_exception _dom_document_set_xml_standalone(struct dom_document *doc,
* DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_document_get_xml_version(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc);
UNUSED(result);
@@ -978,7 +978,7 @@ dom_exception _dom_document_get_xml_version(struct dom_document *doc,
* DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_document_set_xml_version(struct dom_document *doc,
- struct dom_string *version)
+ dom_string *version)
{
UNUSED(doc);
UNUSED(version);
@@ -1030,7 +1030,7 @@ dom_exception _dom_document_set_strict_error_checking(
* finished with it.
*/
dom_exception _dom_document_get_uri(struct dom_document *doc,
- struct dom_string **result)
+ dom_string **result)
{
dom_string_ref(doc->uri);
*result = doc->uri;
@@ -1050,7 +1050,7 @@ dom_exception _dom_document_get_uri(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_document_set_uri(struct dom_document *doc,
- struct dom_string *uri)
+ dom_string *uri)
{
dom_string_unref(doc->uri);
dom_string_ref(uri);
@@ -1200,7 +1200,7 @@ dom_exception _dom_document_normalize(struct dom_document *doc)
*/
dom_exception _dom_document_rename_node(struct dom_document *doc,
struct dom_node *node,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_node **result)
{
UNUSED(doc);
@@ -1273,7 +1273,7 @@ dom_exception _dom_document_copy(struct dom_node_internal *new,
* returned DOM string.
*/
dom_exception _dom_document_create_string(struct dom_document *doc,
- const uint8_t *data, size_t len, struct dom_string **result)
+ const uint8_t *data, size_t len, dom_string **result)
{
return dom_string_create(doc->alloc, doc->pw, data, len, result);
}
@@ -1333,7 +1333,7 @@ void _dom_document_get_allocator(struct dom_document *doc, dom_alloc *al,
*/
dom_exception _dom_document_create_string_from_lwcstring(
struct dom_document *doc, struct lwc_string_s *str,
- struct dom_string **result)
+ dom_string **result)
{
return _dom_string_create_from_lwcstring(doc->alloc, doc->pw,
str, result);
diff --git a/src/core/document.h b/src/core/document.h
index 3939f9a..911b89f 100644
--- a/src/core/document.h
+++ b/src/core/document.h
@@ -52,7 +52,7 @@ struct dom_document {
struct dom_doc_nl *nodelists; /**< List of active nodelists */
- struct dom_string *uri; /**< The uri of this document */
+ dom_string *uri; /**< The uri of this document */
dom_alloc alloc; /**< Memory (de)allocation function */
void *pw; /**< Pointer to client data */
@@ -81,7 +81,7 @@ bool _dom_document_finalise(struct dom_document *doc);
/* Create a dom_string from C string */
dom_exception _dom_document_create_string(struct dom_document *doc,
- const uint8_t *data, size_t len, struct dom_string **result);
+ const uint8_t *data, size_t len, dom_string **result);
/* Create a lwc_string from C string */
dom_exception _dom_document_create_lwcstring(struct dom_document *doc,
const uint8_t *data, size_t len, struct lwc_string_s **result);
@@ -91,7 +91,7 @@ void _dom_document_unref_lwcstring(struct dom_document *doc,
/* Create a dom_string from a lwc_string */
dom_exception _dom_document_create_string_from_lwcstring(
struct dom_document *doc, struct lwc_string_s *str,
- struct dom_string **result);
+ dom_string **result);
/* Begin the virtual functions */
@@ -102,59 +102,59 @@ dom_exception _dom_document_get_implementation(struct dom_document *doc,
dom_exception _dom_document_get_document_element(struct dom_document *doc,
struct dom_element **result);
dom_exception _dom_document_create_element(struct dom_document *doc,
- struct dom_string *tag_name, struct dom_element **result);
+ dom_string *tag_name, struct dom_element **result);
dom_exception _dom_document_create_document_fragment(struct dom_document *doc,
struct dom_document_fragment **result);
dom_exception _dom_document_create_text_node(struct dom_document *doc,
- struct dom_string *data, struct dom_text **result);
+ dom_string *data, struct dom_text **result);
dom_exception _dom_document_create_comment(struct dom_document *doc,
- struct dom_string *data, struct dom_comment **result);
+ dom_string *data, struct dom_comment **result);
dom_exception _dom_document_create_cdata_section(struct dom_document *doc,
- struct dom_string *data, struct dom_cdata_section **result);
+ dom_string *data, struct dom_cdata_section **result);
dom_exception _dom_document_create_processing_instruction(
- struct dom_document *doc, struct dom_string *target,
- struct dom_string *data,
+ struct dom_document *doc, dom_string *target,
+ dom_string *data,
struct dom_processing_instruction **result);
dom_exception _dom_document_create_attribute(struct dom_document *doc,
- struct dom_string *name, struct dom_attr **result);
+ dom_string *name, struct dom_attr **result);
dom_exception _dom_document_create_entity_reference(struct dom_document *doc,
- struct dom_string *name,
+ dom_string *name,
struct dom_entity_reference **result);
dom_exception _dom_document_get_elements_by_tag_name(struct dom_document *doc,
- struct dom_string *tagname, struct dom_nodelist **result);
+ dom_string *tagname, struct dom_nodelist **result);
dom_exception _dom_document_import_node(struct dom_document *doc,
struct dom_node *node, bool deep, struct dom_node **result);
dom_exception _dom_document_create_element_ns(struct dom_document *doc,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_element **result);
dom_exception _dom_document_create_attribute_ns(struct dom_document *doc,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_attr **result);
dom_exception _dom_document_get_elements_by_tag_name_ns(
- struct dom_document *doc, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result);
+ struct dom_document *doc, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result);
dom_exception _dom_document_get_element_by_id(struct dom_document *doc,
- struct dom_string *id, struct dom_element **result);
+ dom_string *id, struct dom_element **result);
dom_exception _dom_document_get_input_encoding(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_get_xml_encoding(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_get_xml_standalone(struct dom_document *doc,
bool *result);
dom_exception _dom_document_set_xml_standalone(struct dom_document *doc,
bool standalone);
dom_exception _dom_document_get_xml_version(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_set_xml_version(struct dom_document *doc,
- struct dom_string *version);
+ dom_string *version);
dom_exception _dom_document_get_strict_error_checking(
struct dom_document *doc, bool *result);
dom_exception _dom_document_set_strict_error_checking(
struct dom_document *doc, bool strict);
dom_exception _dom_document_get_uri(struct dom_document *doc,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_set_uri(struct dom_document *doc,
- struct dom_string *uri);
+ dom_string *uri);
dom_exception _dom_document_adopt_node(struct dom_document *doc,
struct dom_node *node, struct dom_node **result);
dom_exception _dom_document_get_dom_config(struct dom_document *doc,
@@ -162,7 +162,7 @@ dom_exception _dom_document_get_dom_config(struct dom_document *doc,
dom_exception _dom_document_normalize(struct dom_document *doc);
dom_exception _dom_document_rename_node(struct dom_document *doc,
struct dom_node *node,
- struct dom_string *namespace, struct dom_string *qname,
+ dom_string *namespace, dom_string *qname,
struct dom_node **result);
#define DOM_DOCUMENT_VTABLE \
@@ -205,7 +205,7 @@ dom_exception _dom_document_rename_node(struct dom_document *doc,
struct dom_document_protected_vtable {
struct dom_node_protect_vtable base;
dom_exception (*dom_document_get_base)(dom_document *doc,
- struct dom_string **base_uri);
+ dom_string **base_uri);
/* Get the document's base uri */
};
@@ -213,14 +213,14 @@ typedef struct dom_document_protected_vtable dom_document_protected_vtable;
/* Get the document's base URI */
static inline dom_exception dom_document_get_base(dom_document *doc,
- struct dom_string **base_uri)
+ dom_string **base_uri)
{
struct dom_node_internal *node = (struct dom_node_internal *) doc;
return ((dom_document_protected_vtable *) node->vtable)->
dom_document_get_base(doc, base_uri);
}
#define dom_document_get_base(d, b) dom_document_get_base( \
- (dom_document *) (d), (struct dom_string **) (b))
+ (dom_document *) (d), (dom_string **) (b))
/* Following comes the protected vtable */
void _dom_document_destroy(struct dom_node_internal *node);
diff --git a/src/core/document_type.c b/src/core/document_type.c
index 7788b1d..cfec29d 100644
--- a/src/core/document_type.c
+++ b/src/core/document_type.c
@@ -24,8 +24,8 @@
struct dom_document_type {
struct dom_node_internal base; /**< Base node */
- struct dom_string *public_id; /**< Doctype public ID */
- struct dom_string *system_id; /**< Doctype system ID */
+ dom_string *public_id; /**< Doctype public ID */
+ dom_string *system_id; /**< Doctype system ID */
struct dom_resource_mgr res; /**< resource_mgr of this node */
};
@@ -61,8 +61,8 @@ static struct dom_node_protect_vtable dt_protect_vtable = {
* explicitly. The client must unref the doctype once it has
* finished with it.
*/
-dom_exception _dom_document_type_create(struct dom_string *qname,
- struct dom_string *public_id, struct dom_string *system_id,
+dom_exception _dom_document_type_create(dom_string *qname,
+ dom_string *public_id, dom_string *system_id,
dom_alloc alloc, void *pw,
struct dom_document_type **doctype)
{
@@ -107,8 +107,8 @@ void _dom_document_type_destroy(struct dom_node_internal *doctypenode)
/* Initialise this document_type */
dom_exception _dom_document_type_initialise(struct dom_document_type *doctype,
- struct dom_string *qname, struct dom_string *public_id,
- struct dom_string *system_id, dom_alloc alloc, void *pw)
+ dom_string *qname, dom_string *public_id,
+ dom_string *system_id, dom_alloc alloc, void *pw)
{
dom_exception err;
@@ -207,7 +207,7 @@ void _dom_document_type_finalise(struct dom_document_type *doctype)
* return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_document_type_get_name(struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
return dom_node_get_node_name(doc_type, result);
}
@@ -276,7 +276,7 @@ dom_exception _dom_document_type_get_notations(
*/
dom_exception _dom_document_type_get_public_id(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc_type);
UNUSED(result);
@@ -300,7 +300,7 @@ dom_exception _dom_document_type_get_public_id(
*/
dom_exception _dom_document_type_get_system_id(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc_type);
UNUSED(result);
@@ -324,7 +324,7 @@ dom_exception _dom_document_type_get_system_id(
*/
dom_exception _dom_document_type_get_internal_subset(
struct dom_document_type *doc_type,
- struct dom_string **result)
+ dom_string **result)
{
UNUSED(doc_type);
UNUSED(result);
diff --git a/src/core/document_type.h b/src/core/document_type.h
index 4fd1c83..7fcac8e 100644
--- a/src/core/document_type.h
+++ b/src/core/document_type.h
@@ -12,21 +12,21 @@ struct dom_document_type;
struct dom_resource_mgr;
/* Create a DOM document type */
-dom_exception _dom_document_type_create(struct dom_string *qname,
- struct dom_string *public_id,
- struct dom_string *system_id,
+dom_exception _dom_document_type_create(dom_string *qname,
+ dom_string *public_id,
+ dom_string *system_id,
dom_alloc alloc, void *pw,
struct dom_document_type **doctype);
/* Destroy a document type */
void _dom_document_type_destroy(struct dom_node_internal *doctypenode);
dom_exception _dom_document_type_initialise(struct dom_document_type *doctype,
- struct dom_string *qname, struct dom_string *public_id,
- struct dom_string *system_id, dom_alloc alloc, void *pw);
+ dom_string *qname, dom_string *public_id,
+ dom_string *system_id, dom_alloc alloc, void *pw);
void _dom_document_type_finalise(struct dom_document_type *doctype);
/* The virtual functions of DocumentType */
dom_exception _dom_document_type_get_name(struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_type_get_entities(
struct dom_document_type *doc_type,
struct dom_namednodemap **result);
@@ -35,13 +35,13 @@ dom_exception _dom_document_type_get_notations(
struct dom_namednodemap **result);
dom_exception _dom_document_type_get_public_id(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_type_get_system_id(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_document_type_get_internal_subset(
struct dom_document_type *doc_type,
- struct dom_string **result);
+ dom_string **result);
#define DOM_DOCUMENT_TYPE_VTABLE \
_dom_document_type_get_name, \
diff --git a/src/core/element.c b/src/core/element.c
index 1069e60..580cb41 100644
--- a/src/core/element.c
+++ b/src/core/element.c
@@ -50,15 +50,15 @@ static struct dom_element_protected_vtable element_protect_vtable = {
};
static dom_exception _dom_element_get_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
- struct dom_string **value);
+ struct dom_hash_table *hs, dom_string *name,
+ dom_string **value);
static dom_exception _dom_element_set_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
- struct dom_string *value);
+ struct dom_hash_table *hs, dom_string *name,
+ dom_string *value);
static dom_exception _dom_element_remove_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name);
+ struct dom_hash_table *hs, dom_string *name);
static dom_exception _dom_element_get_attr_node(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
+ struct dom_hash_table *hs, dom_string *name,
struct dom_attr **result);
static dom_exception _dom_element_set_attr_node(struct dom_element *element,
struct dom_hash_table *hs, struct dom_attr *attr,
@@ -67,33 +67,33 @@ static dom_exception _dom_element_remove_attr_node(struct dom_element *element,
struct dom_hash_table *hs, struct dom_attr *attr,
struct dom_attr **result);
static dom_exception _dom_element_has_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
+ struct dom_hash_table *hs, dom_string *name,
bool *result);
static dom_exception _dom_element_set_id_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name, bool is_id);
+ struct dom_hash_table *hs, dom_string *name, bool is_id);
/* The operation set for namednodemap */
static dom_exception attributes_get_length(void *priv,
unsigned long *length);
static dom_exception attributes_get_named_item(void *priv,
- struct dom_string *name, struct dom_node **node);
+ dom_string *name, struct dom_node **node);
static dom_exception attributes_set_named_item(void *priv,
struct dom_node *arg, struct dom_node **node);
static dom_exception attributes_remove_named_item(
- void *priv, struct dom_string *name,
+ void *priv, dom_string *name,
struct dom_node **node);
static dom_exception attributes_item(void *priv,
unsigned long index, struct dom_node **node);
static dom_exception attributes_get_named_item_ns(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
static dom_exception attributes_set_named_item_ns(
void *priv, struct dom_node *arg,
struct dom_node **node);
static dom_exception attributes_remove_named_item_ns(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
static void attributes_destroy(void *priv);
static bool attributes_equal(void *p1, void *p2);
@@ -273,7 +273,7 @@ void _dom_element_destroy(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_element_get_tag_name(struct dom_element *element,
- struct dom_string **name)
+ dom_string **name)
{
/* This is the same as nodeName */
return dom_node_get_node_name((struct dom_node *) element, name);
@@ -292,7 +292,7 @@ dom_exception _dom_element_get_tag_name(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_attribute(struct dom_element *element,
- struct dom_string *name, struct dom_string **value)
+ dom_string *name, dom_string **value)
{
return _dom_element_get_attr(element, element->attributes, name, value);
}
@@ -308,7 +308,7 @@ dom_exception _dom_element_get_attribute(struct dom_element *element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly.
*/
dom_exception _dom_element_set_attribute(struct dom_element *element,
- struct dom_string *name, struct dom_string *value)
+ dom_string *name, dom_string *value)
{
return _dom_element_set_attr(element, element->attributes, name, value);
}
@@ -322,7 +322,7 @@ dom_exception _dom_element_set_attribute(struct dom_element *element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly.
*/
dom_exception _dom_element_remove_attribute(struct dom_element *element,
- struct dom_string *name)
+ dom_string *name)
{
return _dom_element_remove_attr(element, element->attributes, name);
}
@@ -340,7 +340,7 @@ dom_exception _dom_element_remove_attribute(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_attribute_node(struct dom_element *element,
- struct dom_string *name, struct dom_attr **result)
+ dom_string *name, struct dom_attr **result)
{
return _dom_element_get_attr_node(element, element->attributes, name,
result);
@@ -406,7 +406,7 @@ dom_exception _dom_element_remove_attribute_node(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_elements_by_tag_name(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_nodelist **result)
{
dom_exception err;
@@ -445,8 +445,8 @@ dom_exception _dom_element_get_elements_by_tag_name(
* finished with it.
*/
dom_exception _dom_element_get_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
- struct dom_string **value)
+ dom_string *namespace, dom_string *localname,
+ dom_string **value)
{
lwc_string *str;
dom_exception err;
@@ -500,8 +500,8 @@ dom_exception _dom_element_get_attribute_ns(struct dom_element *element,
* Namespaces.
*/
dom_exception _dom_element_set_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *qname,
- struct dom_string *value)
+ dom_string *namespace, dom_string *qname,
+ dom_string *value)
{
lwc_string *str;
dom_exception err;
@@ -570,7 +570,7 @@ dom_exception _dom_element_set_attribute_ns(struct dom_element *element,
* Namespaces.
*/
dom_exception _dom_element_remove_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname)
+ dom_string *namespace, dom_string *localname)
{
lwc_string *str;
dom_exception err;
@@ -611,7 +611,7 @@ dom_exception _dom_element_remove_attribute_ns(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_attribute_node_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
struct dom_attr **result)
{
lwc_string *str;
@@ -725,8 +725,8 @@ dom_exception _dom_element_set_attribute_node_ns(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_elements_by_tag_name_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result)
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result)
{
dom_document *doc;
dom_exception err;
@@ -772,7 +772,7 @@ dom_exception _dom_element_get_elements_by_tag_name_ns(
* \return DOM_NO_ERR.
*/
dom_exception _dom_element_has_attribute(struct dom_element *element,
- struct dom_string *name, bool *result)
+ dom_string *name, bool *result)
{
return _dom_element_has_attr(element, element->attributes, name,
result);
@@ -793,7 +793,7 @@ dom_exception _dom_element_has_attribute(struct dom_element *element,
* Namespaces.
*/
dom_exception _dom_element_has_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
bool *result)
{
lwc_string *str;
@@ -854,7 +854,7 @@ dom_exception _dom_element_get_schema_type_info(struct dom_element *element,
* one such attribute node.
*/
dom_exception _dom_element_set_id_attribute(struct dom_element *element,
- struct dom_string *name, bool is_id)
+ dom_string *name, bool is_id)
{
return _dom_element_set_id_attr(element, element->attributes, name,
is_id);
@@ -873,7 +873,7 @@ dom_exception _dom_element_set_id_attribute(struct dom_element *element,
* attribute of ::element.
*/
dom_exception _dom_element_set_id_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
bool is_id)
{
struct dom_hash_table *hs;
@@ -988,7 +988,7 @@ dom_exception _dom_element_has_attributes(dom_node_internal *node, bool *result)
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result)
+ dom_string *namespace, dom_string **result)
{
struct dom_element *owner;
dom_exception err;
@@ -1014,7 +1014,7 @@ dom_exception _dom_element_lookup_prefix(dom_node_internal *node,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result)
+ dom_string *namespace, bool *result)
{
struct dom_element *ele = (struct dom_element *) node;
lwc_string *ns;
@@ -1068,7 +1068,7 @@ dom_exception _dom_element_is_default_namespace(dom_node_internal *node,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result)
+ dom_string *prefix, dom_string **result)
{
lwc_string *pf;
dom_exception err;
@@ -1138,8 +1138,8 @@ dom_exception _dom_element_lookup_namespace(dom_node_internal *node,
* later easy accessing by any client.
*/
dom_exception _dom_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
@@ -1242,8 +1242,8 @@ dom_exception _dom_element_copy(struct dom_node_internal *new,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_get_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
- struct dom_string **value)
+ struct dom_hash_table *hs, dom_string *name,
+ dom_string **value)
{
void *a;
dom_exception err = DOM_NO_ERR;
@@ -1276,8 +1276,8 @@ dom_exception _dom_element_get_attr(struct dom_element *element,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_set_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
- struct dom_string *value)
+ struct dom_hash_table *hs, dom_string *name,
+ dom_string *value)
{
void *a;
dom_exception err;
@@ -1400,7 +1400,7 @@ dom_exception _dom_element_set_attr(struct dom_element *element,
* DOM_NO_MODIFICATION_ALLOWED_ERR if ::element is readonly.
*/
dom_exception _dom_element_remove_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name)
+ struct dom_hash_table *hs, dom_string *name)
{
void *a;
dom_exception err;
@@ -1481,7 +1481,7 @@ dom_exception _dom_element_remove_attr(struct dom_element *element,
* finished with it.
*/
dom_exception _dom_element_get_attr_node(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
+ struct dom_hash_table *hs, dom_string *name,
struct dom_attr **result)
{
void *a;
@@ -1773,7 +1773,7 @@ dom_exception _dom_element_remove_attr_node(struct dom_element *element,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_has_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name,
+ struct dom_hash_table *hs, dom_string *name,
bool *result)
{
void *a;
@@ -1807,7 +1807,7 @@ dom_exception _dom_element_has_attr(struct dom_element *element,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_element_set_id_attr(struct dom_element *element,
- struct dom_hash_table *hs, struct dom_string *name, bool is_id)
+ struct dom_hash_table *hs, dom_string *name, bool is_id)
{
dom_attr *attr;
lwc_string *str;
@@ -1971,7 +1971,7 @@ dom_exception attributes_get_length(void *priv,
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
dom_exception attributes_get_named_item(void *priv,
- struct dom_string *name, struct dom_node **node)
+ dom_string *name, struct dom_node **node)
{
dom_element *e = (dom_element *) priv;
@@ -1996,7 +1996,7 @@ dom_exception attributes_set_named_item(void *priv,
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
dom_exception attributes_remove_named_item(
- void *priv, struct dom_string *name,
+ void *priv, dom_string *name,
struct dom_node **node)
{
dom_element *e = (dom_element *) priv;
@@ -2068,8 +2068,8 @@ dom_exception attributes_item(void *priv,
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
dom_exception attributes_get_named_item_ns(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node)
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node)
{
dom_element *e = (dom_element *) priv;
@@ -2096,8 +2096,8 @@ dom_exception attributes_set_named_item_ns(
/* Implementation function for NamedNodeMap, see core/namednodemap.h for
* details */
dom_exception attributes_remove_named_item_ns(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node)
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node)
{
dom_element *e = (dom_element *) priv;
dom_exception err;
diff --git a/src/core/element.h b/src/core/element.h
index 8a64314..66d1a50 100644
--- a/src/core/element.h
+++ b/src/core/element.h
@@ -18,7 +18,6 @@ struct dom_document;
struct dom_element;
struct dom_namednodemap;
struct dom_node;
-struct dom_string;
struct dom_attr;
struct dom_type_info;
struct dom_hash_table;
@@ -57,49 +56,49 @@ void _dom_element_destroy(struct dom_document *doc,
/* The virtual functions of dom_element */
dom_exception _dom_element_get_tag_name(struct dom_element *element,
- struct dom_string **name);
+ dom_string **name);
dom_exception _dom_element_get_attribute(struct dom_element *element,
- struct dom_string *name, struct dom_string **value);
+ dom_string *name, dom_string **value);
dom_exception _dom_element_set_attribute(struct dom_element *element,
- struct dom_string *name, struct dom_string *value);
+ dom_string *name, dom_string *value);
dom_exception _dom_element_remove_attribute(struct dom_element *element,
- struct dom_string *name);
+ dom_string *name);
dom_exception _dom_element_get_attribute_node(struct dom_element *element,
- struct dom_string *name, struct dom_attr **result);
+ dom_string *name, struct dom_attr **result);
dom_exception _dom_element_set_attribute_node(struct dom_element *element,
struct dom_attr *attr, struct dom_attr **result);
dom_exception _dom_element_remove_attribute_node(struct dom_element *element,
struct dom_attr *attr, struct dom_attr **result);
dom_exception _dom_element_get_elements_by_tag_name(
- struct dom_element *element, struct dom_string *name,
+ struct dom_element *element, dom_string *name,
struct dom_nodelist **result);
dom_exception _dom_element_get_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
- struct dom_string **value);
+ dom_string *namespace, dom_string *localname,
+ dom_string **value);
dom_exception _dom_element_set_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *qname,
- struct dom_string *value);
+ dom_string *namespace, dom_string *qname,
+ dom_string *value);
dom_exception _dom_element_remove_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname);
+ dom_string *namespace, dom_string *localname);
dom_exception _dom_element_get_attribute_node_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
struct dom_attr **result);
dom_exception _dom_element_set_attribute_node_ns(struct dom_element *element,
struct dom_attr *attr, struct dom_attr **result);
dom_exception _dom_element_get_elements_by_tag_name_ns(
- struct dom_element *element, struct dom_string *namespace,
- struct dom_string *localname, struct dom_nodelist **result);
+ struct dom_element *element, dom_string *namespace,
+ dom_string *localname, struct dom_nodelist **result);
dom_exception _dom_element_has_attribute(struct dom_element *element,
- struct dom_string *name, bool *result);
+ dom_string *name, bool *result);
dom_exception _dom_element_has_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
bool *result);
dom_exception _dom_element_get_schema_type_info(struct dom_element *element,
struct dom_type_info **result);
dom_exception _dom_element_set_id_attribute(struct dom_element *element,
- struct dom_string *name, bool is_id);
+ dom_string *name, bool is_id);
dom_exception _dom_element_set_id_attribute_ns(struct dom_element *element,
- struct dom_string *namespace, struct dom_string *localname,
+ dom_string *namespace, dom_string *localname,
bool is_id);
dom_exception _dom_element_set_id_attribute_node(struct dom_element *element,
struct dom_attr *id_attr, bool is_id);
@@ -133,11 +132,11 @@ dom_exception _dom_element_has_attributes(dom_node_internal *node,
bool *result);
dom_exception _dom_element_normalize(dom_node_internal *node);
dom_exception _dom_element_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result);
+ dom_string *namespace, dom_string **result);
dom_exception _dom_element_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result);
+ dom_string *namespace, bool *result);
dom_exception _dom_element_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result);
+ dom_string *prefix, dom_string **result);
#define DOM_NODE_VTABLE_ELEMENT \
_dom_node_get_node_name, \
_dom_node_get_node_value, \
@@ -184,8 +183,8 @@ struct dom_element_protected_vtable {
struct dom_node_protect_vtable base;
dom_exception (*dom_element_parse_attribute)(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
/**< Called by dom_attr_set_value, and used to check
* whether the new attribute value is valid and
* return a valid on if it is not
@@ -196,22 +195,22 @@ typedef struct dom_element_protected_vtable dom_element_protected_vtable;
/* Parse the attribute's value */
static inline dom_exception dom_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
struct dom_node_internal *node = (struct dom_node_internal *) ele;
return ((dom_element_protected_vtable *) node->vtable)->
dom_element_parse_attribute(ele, name, value, parsed);
}
#define dom_element_parse_attribute(e, n, v, p) dom_element_parse_attribute( \
- (dom_element *) (e), (struct dom_string *) (n), \
- (struct dom_string *) (v), (struct dom_string **) (p))
+ (dom_element *) (e), (dom_string *) (n), \
+ (dom_string *) (v), (dom_string **) (p))
/* The protected virtual function */
dom_exception _dom_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void __dom_element_destroy(dom_node_internal *node);
dom_exception _dom_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/core/entity_ref.c b/src/core/entity_ref.c
index c5b426c..f35b306 100644
--- a/src/core/entity_ref.c
+++ b/src/core/entity_ref.c
@@ -43,7 +43,7 @@ static struct dom_node_protect_vtable er_protect_vtable = {
* The returned node will already be referenced.
*/
dom_exception _dom_entity_reference_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_entity_reference **result)
{
struct dom_entity_reference *e;
@@ -101,7 +101,7 @@ void _dom_entity_reference_destroy(struct dom_document *doc,
* finished with it.
*/
dom_exception _dom_entity_reference_get_textual_representation(
- struct dom_entity_reference *entity, struct dom_string **result)
+ struct dom_entity_reference *entity, dom_string **result)
{
UNUSED(entity);
UNUSED(result);
diff --git a/src/core/entity_ref.h b/src/core/entity_ref.h
index 2b83d07..b83765c 100644
--- a/src/core/entity_ref.h
+++ b/src/core/entity_ref.h
@@ -13,11 +13,10 @@
struct dom_document;
struct dom_entity_reference;
-struct dom_string;
struct lwc_string_s;
dom_exception _dom_entity_reference_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_entity_reference **result);
void _dom_entity_reference_destroy(struct dom_document *doc,
@@ -41,6 +40,6 @@ dom_exception _dom_er_copy(struct dom_node_internal *new,
/* Helper functions */
dom_exception _dom_entity_reference_get_textual_representation(
struct dom_entity_reference *entity,
- struct dom_string **result);
+ dom_string **result);
#endif
diff --git a/src/core/namednodemap.c b/src/core/namednodemap.c
index ec1e151..508fbb0 100644
--- a/src/core/namednodemap.c
+++ b/src/core/namednodemap.c
@@ -134,7 +134,7 @@ dom_exception dom_namednodemap_get_length(struct dom_namednodemap *map,
* should unref the node once it has finished with it.
*/
dom_exception _dom_namednodemap_get_named_item(struct dom_namednodemap *map,
- struct dom_string *name, struct dom_node **node)
+ dom_string *name, struct dom_node **node)
{
assert(map->opt != NULL);
return map->opt->namednodemap_get_named_item(map->priv, name, node);
@@ -186,7 +186,7 @@ dom_exception _dom_namednodemap_set_named_item(struct dom_namednodemap *map,
* should unref the node once it has finished with it.
*/
dom_exception _dom_namednodemap_remove_named_item(
- struct dom_namednodemap *map, struct dom_string *name,
+ struct dom_namednodemap *map, dom_string *name,
struct dom_node **node)
{
assert(map->opt != NULL);
@@ -231,8 +231,8 @@ dom_exception _dom_namednodemap_item(struct dom_namednodemap *map,
* should unref the node once it has finished with it.
*/
dom_exception _dom_namednodemap_get_named_item_ns(
- struct dom_namednodemap *map, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node)
+ struct dom_namednodemap *map, dom_string *namespace,
+ dom_string *localname, struct dom_node **node)
{
assert(map->opt != NULL);
return map->opt->namednodemap_get_named_item_ns(map->priv, namespace,
@@ -296,8 +296,8 @@ dom_exception _dom_namednodemap_set_named_item_ns(
* should unref the node once it has finished with it.
*/
dom_exception _dom_namednodemap_remove_named_item_ns(
- struct dom_namednodemap *map, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node)
+ struct dom_namednodemap *map, dom_string *namespace,
+ dom_string *localname, struct dom_node **node)
{
assert(map->opt != NULL);
return map->opt->namednodemap_remove_named_item_ns(map->priv, namespace,
diff --git a/src/core/namednodemap.h b/src/core/namednodemap.h
index 328e433..079294c 100644
--- a/src/core/namednodemap.h
+++ b/src/core/namednodemap.h
@@ -16,36 +16,35 @@
struct dom_document;
struct dom_node;
struct dom_namednodemap;
-struct dom_string;
struct nnm_operation {
dom_exception (*namednodemap_get_length)(void *priv,
unsigned long *length);
dom_exception (*namednodemap_get_named_item)(void *priv,
- struct dom_string *name, struct dom_node **node);
+ dom_string *name, struct dom_node **node);
dom_exception (*namednodemap_set_named_item)(void *priv,
struct dom_node *arg, struct dom_node **node);
dom_exception (*namednodemap_remove_named_item)(
- void *priv, struct dom_string *name,
+ void *priv, dom_string *name,
struct dom_node **node);
dom_exception (*namednodemap_item)(void *priv,
unsigned long index, struct dom_node **node);
dom_exception (*namednodemap_get_named_item_ns)(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
dom_exception (*namednodemap_set_named_item_ns)(
void *priv, struct dom_node *arg,
struct dom_node **node);
dom_exception (*namednodemap_remove_named_item_ns)(
- void *priv, struct dom_string *namespace,
- struct dom_string *localname, struct dom_node **node);
+ void *priv, dom_string *namespace,
+ dom_string *localname, struct dom_node **node);
void (*namednodemap_destroy)(void *priv);
diff --git a/src/core/node.c b/src/core/node.c
index 71977b4..14dad4a 100644
--- a/src/core/node.c
+++ b/src/core/node.c
@@ -142,7 +142,7 @@ void _dom_node_destroy(struct dom_node_internal *node)
*/
dom_exception _dom_node_initialise(dom_node_internal *node,
struct dom_document *doc, dom_node_type type,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct lwc_string_s *namespace, struct lwc_string_s *prefix)
{
dom_alloc alloc;
@@ -180,7 +180,7 @@ dom_exception _dom_node_initialise_generic(
struct dom_node_internal *node, struct dom_document *doc,
dom_alloc alloc, void *pw,
dom_node_type type, struct lwc_string_s *name,
- struct dom_string *value, struct lwc_string_s *namespace,
+ dom_string *value, struct lwc_string_s *namespace,
struct lwc_string_s *prefix)
{
UNUSED(alloc);
@@ -388,9 +388,9 @@ void _dom_node_unref(dom_node_internal *node)
* finished with it.
*/
dom_exception _dom_node_get_node_name(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
- struct dom_string *node_name, *temp;
+ dom_string *node_name, *temp;
dom_document *doc;
dom_exception err;
struct dom_resource_mgr rm;
@@ -414,7 +414,7 @@ dom_exception _dom_node_get_node_name(dom_node_internal *node,
* has a defined prefix, then nodeName is a QName comprised
* of prefix:name. */
if(node->prefix != NULL) {
- struct dom_string *colon;
+ dom_string *colon;
err = _dom_resource_mgr_create_string(&rm,
(const uint8_t *) ":", SLEN(":"), &colon);
@@ -491,7 +491,7 @@ dom_exception _dom_node_get_node_name(dom_node_internal *node,
* this implementation; dom_strings are unbounded.
*/
dom_exception _dom_node_get_node_value(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
if (node->value != NULL)
dom_string_ref(node->value);
@@ -515,7 +515,7 @@ dom_exception _dom_node_get_node_value(dom_node_internal *node,
* a reference on the string). The node's existing value will be unrefed.
*/
dom_exception _dom_node_set_node_value(dom_node_internal *node,
- struct dom_string *value)
+ dom_string *value)
{
/* TODO
* Whether we should change this to a virtual function?
@@ -1292,7 +1292,7 @@ dom_exception _dom_node_normalize(dom_node_internal *node)
* \return DOM_NO_ERR.
*/
dom_exception _dom_node_is_supported(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
bool *result)
{
bool has;
@@ -1319,7 +1319,7 @@ dom_exception _dom_node_is_supported(dom_node_internal *node,
* finished with it.
*/
dom_exception _dom_node_get_namespace(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
assert(node->owner != NULL);
@@ -1343,7 +1343,7 @@ dom_exception _dom_node_get_namespace(dom_node_internal *node,
* finished with it.
*/
dom_exception _dom_node_get_prefix(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
assert(node->owner != NULL);
@@ -1380,7 +1380,7 @@ dom_exception _dom_node_get_prefix(dom_node_internal *node,
* is "xmlns".
*/
dom_exception _dom_node_set_prefix(dom_node_internal *node,
- struct dom_string *prefix)
+ dom_string *prefix)
{
dom_exception err;
lwc_string *str;
@@ -1436,7 +1436,7 @@ dom_exception _dom_node_set_prefix(dom_node_internal *node,
* finished with it.
*/
dom_exception _dom_node_get_local_name(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
assert(node->owner != NULL);
@@ -1486,7 +1486,7 @@ dom_exception _dom_node_has_attributes(dom_node_internal *node, bool *result)
* return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_node_get_base(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
struct dom_document *doc = node->owner;
assert(doc != NULL);
@@ -1534,7 +1534,7 @@ dom_exception _dom_node_compare_document_position(dom_node_internal *node,
* this implementation; dom_strings are unbounded.
*/
dom_exception _dom_node_get_text_content(dom_node_internal *node,
- struct dom_string **result)
+ dom_string **result)
{
dom_node_internal *n;
dom_string *str;
@@ -1565,7 +1565,7 @@ dom_exception _dom_node_get_text_content(dom_node_internal *node,
* Text node containing the new content.
*/
dom_exception _dom_node_set_text_content(dom_node_internal *node,
- struct dom_string *content)
+ dom_string *content)
{
dom_node_internal *n, *p, *r;
dom_document *doc;
@@ -1630,7 +1630,7 @@ dom_exception _dom_node_is_same(dom_node_internal *node,
* finished with it.
*/
dom_exception _dom_node_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result)
+ dom_string *namespace, dom_string **result)
{
if (node->parent != NULL)
return dom_node_lookup_prefix(node, namespace, result);
@@ -1649,7 +1649,7 @@ dom_exception _dom_node_lookup_prefix(dom_node_internal *node,
* \return DOM_NO_ERR.
*/
dom_exception _dom_node_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result)
+ dom_string *namespace, bool *result)
{
if (node->parent != NULL)
return dom_node_is_default_namespace(node, namespace, result);
@@ -1671,7 +1671,7 @@ dom_exception _dom_node_is_default_namespace(dom_node_internal *node,
* finished with it.
*/
dom_exception _dom_node_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result)
+ dom_string *prefix, dom_string **result)
{
if (node->parent != NULL)
return dom_node_lookup_namespace(node->parent, prefix, result);
@@ -1786,7 +1786,7 @@ dom_exception _dom_node_is_equal(dom_node_internal *node,
* \return DOM_NO_ERR.
*/
dom_exception _dom_node_get_feature(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
void **result)
{
bool has;
@@ -1816,7 +1816,7 @@ dom_exception _dom_node_get_feature(dom_node_internal *node,
* \return DOM_NO_ERR.
*/
dom_exception _dom_node_set_user_data(dom_node_internal *node,
- struct dom_string *key, void *data,
+ dom_string *key, void *data,
dom_user_data_handler handler, void **result)
{
struct dom_user_data *ud = NULL;
@@ -1886,7 +1886,7 @@ dom_exception _dom_node_set_user_data(dom_node_internal *node,
* \return DOM_NO_ERR.
*/
dom_exception _dom_node_get_user_data(dom_node_internal *node,
- struct dom_string *key, void **result)
+ dom_string *key, void **result)
{
struct dom_user_data *ud = NULL;
diff --git a/src/core/node.h b/src/core/node.h
index 70187d6..3134c49 100644
--- a/src/core/node.h
+++ b/src/core/node.h
@@ -24,7 +24,7 @@
* User data context attached to a DOM node
*/
struct dom_user_data {
- struct dom_string *key; /**< Key for data */
+ dom_string *key; /**< Key for data */
void *data; /**< Client-specific data */
dom_user_data_handler handler; /**< Callback function */
@@ -61,7 +61,7 @@ struct dom_node_internal {
struct lwc_string_s *name; /**< Node name (this is the local part
* of a QName in the cases where a
* namespace exists) */
- struct dom_string *value; /**< Node value */
+ dom_string *value; /**< Node value */
dom_node_type type; /**< Node type */
dom_node_internal *parent; /**< Parent node */
dom_node_internal *first_child; /**< First child node */
@@ -87,14 +87,14 @@ dom_node_internal * _dom_node_create(struct dom_document *doc);
dom_exception _dom_node_initialise(struct dom_node_internal *node,
struct dom_document *doc, dom_node_type type,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct lwc_string_s *namespace, struct lwc_string_s *prefix);
dom_exception _dom_node_initialise_generic(
struct dom_node_internal *node, struct dom_document *doc,
dom_alloc alloc, void *pw,
dom_node_type type, struct lwc_string_s *name,
- struct dom_string *value, struct lwc_string_s *namespace,
+ dom_string *value, struct lwc_string_s *namespace,
struct lwc_string_s *prefix);
void _dom_node_finalise(struct dom_document *doc, dom_node_internal *node);
@@ -105,11 +105,11 @@ bool _dom_node_readonly(const dom_node_internal *node);
/* The DOM Node's vtable methods */
dom_exception _dom_node_get_node_name(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_get_node_value(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_set_node_value(dom_node_internal *node,
- struct dom_string *value);
+ dom_string *value);
dom_exception _dom_node_get_node_type(dom_node_internal *node,
dom_node_type *result);
dom_exception _dom_node_get_parent_node(dom_node_internal *node,
@@ -145,43 +145,43 @@ dom_exception _dom_node_clone_node(dom_node_internal *node, bool deep,
dom_node_internal **result);
dom_exception _dom_node_normalize(dom_node_internal *node);
dom_exception _dom_node_is_supported(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
bool *result);
dom_exception _dom_node_get_namespace(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_get_prefix(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_set_prefix(dom_node_internal *node,
- struct dom_string *prefix);
+ dom_string *prefix);
dom_exception _dom_node_get_local_name(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_has_attributes(dom_node_internal *node, bool *result);
dom_exception _dom_node_get_base(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_compare_document_position(dom_node_internal *node,
dom_node_internal *other, uint16_t *result);
dom_exception _dom_node_get_text_content(dom_node_internal *node,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_node_set_text_content(dom_node_internal *node,
- struct dom_string *content);
+ dom_string *content);
dom_exception _dom_node_is_same(dom_node_internal *node,
dom_node_internal *other, bool *result);
dom_exception _dom_node_lookup_prefix(dom_node_internal *node,
- struct dom_string *namespace, struct dom_string **result);
+ dom_string *namespace, dom_string **result);
dom_exception _dom_node_is_default_namespace(dom_node_internal *node,
- struct dom_string *namespace, bool *result);
+ dom_string *namespace, bool *result);
dom_exception _dom_node_lookup_namespace(dom_node_internal *node,
- struct dom_string *prefix, struct dom_string **result);
+ dom_string *prefix, dom_string **result);
dom_exception _dom_node_is_equal(dom_node_internal *node,
dom_node_internal *other, bool *result);
dom_exception _dom_node_get_feature(dom_node_internal *node,
- struct dom_string *feature, struct dom_string *version,
+ dom_string *feature, dom_string *version,
void **result);
dom_exception _dom_node_set_user_data(dom_node_internal *node,
- struct dom_string *key, void *data,
+ dom_string *key, void *data,
dom_user_data_handler handler, void **result);
dom_exception _dom_node_get_user_data(dom_node_internal *node,
- struct dom_string *key, void **result);
+ dom_string *key, void **result);
#define DOM_NODE_VTABLE \
_dom_node_get_node_name, \
@@ -276,14 +276,14 @@ static inline dom_exception dom_node_copy(struct dom_node_internal *new,
#define dom_node_get_refcount(n) ((dom_node_internal *) (n))->refcnt
dom_exception _redocument_domstring(struct dom_document *old,
- struct dom_document* new, struct dom_string **string);
+ struct dom_document* new, dom_string **string);
dom_exception _dom_merge_adjacent_text(dom_node_internal *p,
dom_node_internal *n);
/* Used to extract the lwc_string from dom_string.
* If there is no lwc_string inside the param, create one use the node->owner
* as document */
dom_exception _dom_node_get_intern_string(dom_node_internal *node,
- struct dom_string *str, struct lwc_string_s **intern);
+ dom_string *str, struct lwc_string_s **intern);
void _dom_node_unref_intern_string(dom_node_internal *node,
struct lwc_string_s *inter);
dom_exception _dom_node_create_lwcstring(dom_node_internal *node,
diff --git a/src/core/nodelist.h b/src/core/nodelist.h
index e467aa6..ba00cbf 100644
--- a/src/core/nodelist.h
+++ b/src/core/nodelist.h
@@ -15,7 +15,6 @@
struct dom_document;
struct dom_node;
struct dom_nodelist;
-struct dom_string;
struct lwc_string_s;
/**
diff --git a/src/core/pi.c b/src/core/pi.c
index 634dc05..1d7a508 100644
--- a/src/core/pi.c
+++ b/src/core/pi.c
@@ -40,7 +40,7 @@ static struct dom_node_protect_vtable pi_protect_vtable = {
* The returned node will already be referenced.
*/
dom_exception _dom_processing_instruction_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_processing_instruction **result)
{
struct dom_processing_instruction *p;
diff --git a/src/core/pi.h b/src/core/pi.h
index 3f6d46c..8eca330 100644
--- a/src/core/pi.h
+++ b/src/core/pi.h
@@ -12,11 +12,10 @@
struct dom_document;
struct dom_processing_instruction;
-struct dom_string;
struct lwc_string_s;
dom_exception _dom_processing_instruction_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_processing_instruction **result);
void _dom_processing_instruction_destroy(struct dom_document *doc,
diff --git a/src/core/string.c b/src/core/string.c
index a443f55..4c104ae 100644
--- a/src/core/string.c
+++ b/src/core/string.c
@@ -35,7 +35,7 @@ struct dom_string {
uint32_t refcnt; /**< Reference count */
};
-static struct dom_string empty_string = {
+static dom_string empty_string = {
.ptr = NULL,
.len = 0,
.intern = NULL,
@@ -51,7 +51,7 @@ static struct dom_string empty_string = {
*
* \param str The string to claim a reference on
*/
-void dom_string_ref(struct dom_string *str)
+void dom_string_ref(dom_string *str)
{
if (str != NULL)
str->refcnt++;
@@ -65,7 +65,7 @@ void dom_string_ref(struct dom_string *str)
* If the reference count reaches zero, any memory claimed by the
* string will be released
*/
-void dom_string_unref(struct dom_string *str)
+void dom_string_unref(dom_string *str)
{
if (str == NULL)
return;
@@ -98,9 +98,9 @@ void dom_string_unref(struct dom_string *str)
* returned DOM string.
*/
dom_exception dom_string_create(dom_alloc alloc, void *pw,
- const uint8_t *ptr, size_t len, struct dom_string **str)
+ const uint8_t *ptr, size_t len, dom_string **str)
{
- struct dom_string *ret;
+ dom_string *ret;
if (ptr == NULL || len == 0) {
dom_string_ref(&empty_string);
@@ -110,7 +110,7 @@ dom_exception dom_string_create(dom_alloc alloc, void *pw,
return DOM_NO_ERR;
}
- ret = alloc(NULL, sizeof(struct dom_string), pw);
+ ret = alloc(NULL, sizeof(dom_string), pw);
if (ret == NULL)
return DOM_NO_MEM_ERR;
@@ -151,7 +151,7 @@ dom_exception dom_string_create(dom_alloc alloc, void *pw,
* real clone, just ref the source string is ok.
*/
dom_exception dom_string_clone(dom_alloc alloc, void *pw,
- struct dom_string *str, struct dom_string **ret)
+ dom_string *str, dom_string **ret)
{
if (alloc == str->alloc && pw == str->pw) {
*ret = str;
@@ -175,7 +175,7 @@ dom_exception dom_string_clone(dom_alloc alloc, void *pw,
* \return DOM_NO_ERR on success, DOM_NO_MEM_ERR on memory exhaustion
*/
dom_exception _dom_string_create_from_lwcstring(dom_alloc alloc, void *pw,
- lwc_string *str, struct dom_string **ret)
+ lwc_string *str, dom_string **ret)
{
dom_string *r;
@@ -184,7 +184,7 @@ dom_exception _dom_string_create_from_lwcstring(dom_alloc alloc, void *pw,
return DOM_NO_ERR;
}
- r = alloc(NULL, sizeof(struct dom_string), pw);
+ r = alloc(NULL, sizeof(dom_string), pw);
if (r == NULL)
return DOM_NO_MEM_ERR;
@@ -218,7 +218,7 @@ dom_exception _dom_string_create_from_lwcstring(dom_alloc alloc, void *pw,
* \param lwcstr The result lwc_string
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_string_intern(struct dom_string *str,
+dom_exception _dom_string_intern(dom_string *str,
struct lwc_string_s **lwcstr)
{
lwc_string *ret;
@@ -254,7 +254,7 @@ dom_exception _dom_string_intern(struct dom_string *str,
* \param lwcstr The lwc_string of this dom-string
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception dom_string_get_intern(struct dom_string *str,
+dom_exception dom_string_get_intern(dom_string *str,
struct lwc_string_s **lwcstr)
{
*lwcstr = str->intern;
@@ -274,7 +274,7 @@ dom_exception dom_string_get_intern(struct dom_string *str,
*
* NULL and "" will match.
*/
-int dom_string_cmp(struct dom_string *s1, struct dom_string *s2)
+int dom_string_cmp(dom_string *s1, dom_string *s2)
{
bool ret;
@@ -308,7 +308,7 @@ int dom_string_cmp(struct dom_string *s1, struct dom_string *s2)
*
* NULL and "" will match.
*/
-int dom_string_icmp(struct dom_string *s1, struct dom_string *s2)
+int dom_string_icmp(dom_string *s1, dom_string *s2)
{
const uint8_t *d1 = NULL;
const uint8_t *d2 = NULL;
@@ -369,7 +369,7 @@ int dom_string_icmp(struct dom_string *s1, struct dom_string *s2)
* \param chr UCS4 value to look for
* \return Character index of found character, or -1 if none found
*/
-uint32_t dom_string_index(struct dom_string *str, uint32_t chr)
+uint32_t dom_string_index(dom_string *str, uint32_t chr)
{
const uint8_t *s;
size_t clen, slen;
@@ -409,7 +409,7 @@ uint32_t dom_string_index(struct dom_string *str, uint32_t chr)
* \param chr UCS4 value to look for
* \return Character index of found character, or -1 if none found
*/
-uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr)
+uint32_t dom_string_rindex(dom_string *str, uint32_t chr)
{
const uint8_t *s;
size_t clen, slen;
@@ -453,7 +453,7 @@ uint32_t dom_string_rindex(struct dom_string *str, uint32_t chr)
* \param str The string to measure the length of
* \return The length of the string, in characters
*/
-uint32_t dom_string_length(struct dom_string *str)
+uint32_t dom_string_length(dom_string *str)
{
size_t clen;
parserutils_error err;
@@ -476,7 +476,7 @@ uint32_t dom_string_length(struct dom_string *str)
* \param ch The UCS4 character
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception dom_string_at(struct dom_string *str, uint32_t index,
+dom_exception dom_string_at(dom_string *str, uint32_t index,
uint32_t *ch)
{
const uint8_t *s;
@@ -533,10 +533,10 @@ dom_exception dom_string_at(struct dom_string *str, uint32_t index,
* The returned string will have its reference count increased. The client
* should dereference it once it has finished with it.
*/
-dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2,
- struct dom_string **result)
+dom_exception dom_string_concat(dom_string *s1, dom_string *s2,
+ dom_string **result)
{
- struct dom_string *concat;
+ dom_string *concat;
dom_alloc alloc;
void *pw;
@@ -555,7 +555,7 @@ dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2,
return DOM_NO_ERR;
}
- concat = alloc(NULL, sizeof(struct dom_string), pw);
+ concat = alloc(NULL, sizeof(dom_string), pw);
if (concat == NULL) {
return DOM_NO_MEM_ERR;
@@ -600,8 +600,8 @@ dom_exception dom_string_concat(struct dom_string *s1, struct dom_string *s2,
* The returned string will have its reference count increased. The client
* should dereference it once it has finished with it.
*/
-dom_exception dom_string_substr(struct dom_string *str,
- uint32_t i1, uint32_t i2, struct dom_string **result)
+dom_exception dom_string_substr(dom_string *str,
+ uint32_t i1, uint32_t i2, dom_string **result)
{
const uint8_t *s = str->ptr;
size_t slen = str->len;
@@ -657,11 +657,11 @@ dom_exception dom_string_substr(struct dom_string *str,
* The returned string will have its reference count increased. The client
* should dereference it once it has finished with it.
*/
-dom_exception dom_string_insert(struct dom_string *target,
- struct dom_string *source, uint32_t offset,
- struct dom_string **result)
+dom_exception dom_string_insert(dom_string *target,
+ dom_string *source, uint32_t offset,
+ dom_string **result)
{
- struct dom_string *res;
+ dom_string *res;
const uint8_t *t, *s;
uint32_t tlen, slen, clen;
uint32_t ins = 0;
@@ -696,7 +696,7 @@ dom_exception dom_string_insert(struct dom_string *target,
}
/* Allocate result string */
- res = target->alloc(NULL, sizeof(struct dom_string), target->pw);
+ res = target->alloc(NULL, sizeof(dom_string), target->pw);
if (res == NULL) {
return DOM_NO_MEM_ERR;
}
@@ -750,11 +750,11 @@ dom_exception dom_string_insert(struct dom_string *target,
* The returned string will have its reference count increased. The client
* should dereference it once it has finished with it.
*/
-dom_exception dom_string_replace(struct dom_string *target,
- struct dom_string *source, uint32_t i1, uint32_t i2,
- struct dom_string **result)
+dom_exception dom_string_replace(dom_string *target,
+ dom_string *source, uint32_t i1, uint32_t i2,
+ dom_string **result)
{
- struct dom_string *res;
+ dom_string *res;
const uint8_t *t, *s;
uint32_t tlen, slen;
uint32_t b1, b2;
@@ -799,7 +799,7 @@ dom_exception dom_string_replace(struct dom_string *target,
}
/* Allocate result string */
- res = target->alloc(NULL, sizeof(struct dom_string), target->pw);
+ res = target->alloc(NULL, sizeof(dom_string), target->pw);
if (res == NULL) {
return DOM_NO_MEM_ERR;
@@ -853,8 +853,8 @@ dom_exception dom_string_replace(struct dom_string *target,
* The returned string will have its reference count increased. The client
* should dereference it once it has finished with it.
*/
-dom_exception dom_string_dup(struct dom_string *str,
- struct dom_string **result)
+dom_exception dom_string_dup(dom_string *str,
+ dom_string **result)
{
if (str->intern != NULL) {
return _dom_string_create_from_lwcstring(str->alloc, str->pw,
@@ -871,7 +871,7 @@ dom_exception dom_string_dup(struct dom_string *str,
* \param str The string to calculate a hash of
* \return The hash value associated with the string
*/
-uint32_t dom_string_hash(struct dom_string *str)
+uint32_t dom_string_hash(dom_string *str)
{
const uint8_t *s = str->ptr;
size_t slen = str->len;
@@ -918,7 +918,7 @@ dom_exception _dom_exception_from_lwc_error(lwc_error err)
* @note: This function is just provided for the convenience of accessing the
* raw C string character, no change on the result string is allowed.
*/
-char *_dom_string_data(struct dom_string *str)
+char *_dom_string_data(dom_string *str)
{
return (char *) str->ptr;
}
@@ -927,7 +927,7 @@ char *_dom_string_data(struct dom_string *str)
*
* \param str The dom_string object
*/
-size_t _dom_string_length(struct dom_string *str)
+size_t _dom_string_length(dom_string *str)
{
return str->len;
}
diff --git a/src/core/string.h b/src/core/string.h
index ef231be..d5a943a 100644
--- a/src/core/string.h
+++ b/src/core/string.h
@@ -13,10 +13,10 @@
/* Create a DOM string from a lwc_string
* This function call mainly used for create a string from lwc_string */
dom_exception _dom_string_create_from_lwcstring(dom_alloc alloc, void *pw,
- struct lwc_string_s *str, struct dom_string **ret);
+ struct lwc_string_s *str, dom_string **ret);
/* Make the dom_string be interned */
-dom_exception _dom_string_intern(struct dom_string *str,
+dom_exception _dom_string_intern(dom_string *str,
struct lwc_string_s **lwcstr);
/* Map the lwc_error to dom_exception */
@@ -27,10 +27,10 @@ dom_exception _dom_exception_from_lwc_error(lwc_error err);
* @note: This function is just provided for the convenience of accessing the
* raw C string character, no change on the result string is allowed.
*/
-char *_dom_string_data(struct dom_string *str);
+char *_dom_string_data(dom_string *str);
/* Get the string length of this dom_string */
-size_t _dom_string_length(struct dom_string *str);
+size_t _dom_string_length(dom_string *str);
#endif
diff --git a/src/core/text.c b/src/core/text.c
index 6aa6d0f..1cb8981 100644
--- a/src/core/text.c
+++ b/src/core/text.c
@@ -69,7 +69,7 @@ static dom_exception walk_logic_adjacent_text(dom_text *text,
* The returned node will already be referenced.
*/
dom_exception _dom_text_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_text **result)
{
struct dom_text *t;
@@ -127,7 +127,7 @@ void _dom_text_destroy(struct dom_document *doc, struct dom_text *text)
*/
dom_exception _dom_text_initialise(struct dom_text *text,
struct dom_document *doc, dom_node_type type,
- struct lwc_string_s *name, struct dom_string *value)
+ struct lwc_string_s *name, dom_string *value)
{
dom_exception err;
@@ -177,7 +177,7 @@ dom_exception _dom_text_split_text(struct dom_text *text,
unsigned long offset, struct dom_text **result)
{
struct dom_node_internal *t = (struct dom_node_internal *) text;
- struct dom_string *value;
+ dom_string *value;
struct dom_text *res;
unsigned long len;
dom_exception err;
@@ -248,7 +248,7 @@ dom_exception _dom_text_get_is_element_content_whitespace(
* \return DOM_NO_ERR.
*/
dom_exception _dom_text_get_whole_text(struct dom_text *text,
- struct dom_string **result)
+ dom_string **result)
{
return walk_logic_adjacent_text(text, COLLECT, result);
}
@@ -267,7 +267,7 @@ dom_exception _dom_text_get_whole_text(struct dom_text *text,
* once it has finished with it.
*/
dom_exception _dom_text_replace_whole_text(struct dom_text *text,
- struct dom_string *content, struct dom_text **result)
+ dom_string *content, struct dom_text **result)
{
dom_exception err;
dom_string *ret;
diff --git a/src/core/text.h b/src/core/text.h
index 44e09e7..c1d0956 100644
--- a/src/core/text.h
+++ b/src/core/text.h
@@ -15,7 +15,6 @@
#include "core/characterdata.h"
struct dom_document;
-struct dom_string;
struct lwc_string_s;
/**
@@ -30,14 +29,14 @@ struct dom_text {
/* Constructor and Destructor */
dom_exception _dom_text_create(struct dom_document *doc,
- struct lwc_string_s *name, struct dom_string *value,
+ struct lwc_string_s *name, dom_string *value,
struct dom_text **result);
void _dom_text_destroy(struct dom_document *doc, struct dom_text *text);
dom_exception _dom_text_initialise(struct dom_text *text,
struct dom_document *doc, dom_node_type type,
- struct lwc_string_s *name, struct dom_string *value);
+ struct lwc_string_s *name, dom_string *value);
void _dom_text_finalise(struct dom_document *doc, struct dom_text *text);
@@ -48,9 +47,9 @@ dom_exception _dom_text_split_text(struct dom_text *text,
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,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_text_replace_whole_text(struct dom_text *text,
- struct dom_string *content, struct dom_text **result);
+ dom_string *content, struct dom_text **result);
#define DOM_TEXT_VTABLE \
_dom_text_split_text, \
diff --git a/src/core/typeinfo.c b/src/core/typeinfo.c
index 4ebefcd..c0ca342 100644
--- a/src/core/typeinfo.c
+++ b/src/core/typeinfo.c
@@ -27,7 +27,7 @@ struct dom_type_info {
* return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
- struct dom_string **ret)
+ dom_string **ret)
{
UNUSED(ti);
UNUSED(ret);
@@ -46,7 +46,7 @@ dom_exception _dom_type_info_get_type_name(dom_type_info *ti,
* return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
- struct dom_string **ret)
+ dom_string **ret)
{
UNUSED(ti);
UNUSED(ret);
@@ -67,7 +67,7 @@ dom_exception _dom_type_info_get_type_namespace(dom_type_info *ti,
* return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_type_info_is_derived(dom_type_info *ti,
- struct dom_string *namespace, struct dom_string *name,
+ dom_string *namespace, dom_string *name,
dom_type_info_derivation_method method, bool *ret)
{
UNUSED(ti);
diff --git a/src/events/custom_event.c b/src/events/custom_event.c
index 920c23e..99b4120 100644
--- a/src/events/custom_event.c
+++ b/src/events/custom_event.c
@@ -89,7 +89,7 @@ dom_exception _dom_custom_event_get_detail(dom_custom_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_custom_event_init_ns(dom_custom_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, void *detail)
{
evt->detail = detail;
diff --git a/src/events/document_event.c b/src/events/document_event.c
index 6f18028..2b89152 100644
--- a/src/events/document_event.c
+++ b/src/events/document_event.c
@@ -91,7 +91,7 @@ void _dom_document_event_internal_finalise(struct dom_document *doc,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_document_event_create_event(dom_document_event *de,
- struct dom_string *type, struct dom_event **evt)
+ dom_string *type, struct dom_event **evt)
{
lwc_string *t = NULL;
dom_exception err;
@@ -175,7 +175,7 @@ dom_exception _dom_document_event_create_event(dom_document_event *de,
* DOM_NO_SUPPORTED_ERR.
*/
dom_exception _dom_document_event_can_dispatch(dom_document_event *de,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool *can)
{
UNUSED(de);
diff --git a/src/events/event.c b/src/events/event.c
index 6cd8d64..98bb0d5 100644
--- a/src/events/event.c
+++ b/src/events/event.c
@@ -129,7 +129,7 @@ void _dom_event_unref(dom_event *evt)
* \parnm type The returned event type
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_event_get_type(dom_event *evt, struct dom_string **type)
+dom_exception _dom_event_get_type(dom_event *evt, dom_string **type)
{
struct dom_document *doc = evt->doc;
dom_exception err;
@@ -245,7 +245,7 @@ dom_exception _dom_event_prevent_default(dom_event *evt)
* \param cancelable Whether this event is cancelable
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_event_init(dom_event *evt, struct dom_string *type,
+dom_exception _dom_event_init(dom_event *evt, dom_string *type,
bool bubble, bool cancelable)
{
assert(evt->doc != NULL);
@@ -273,7 +273,7 @@ dom_exception _dom_event_init(dom_event *evt, struct dom_string *type,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_event_get_namespace(dom_event *evt,
- struct dom_string **namespace)
+ dom_string **namespace)
{
struct dom_document *doc = evt->doc;
dom_exception err;
@@ -337,8 +337,8 @@ dom_exception _dom_event_is_default_prevented(dom_event *evt, bool *prevented)
* \param cancelable Whether this event is cancelable
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_event_init_ns(dom_event *evt, struct dom_string *namespace,
- struct dom_string *type, bool bubble, bool cancelable)
+dom_exception _dom_event_init_ns(dom_event *evt, dom_string *namespace,
+ dom_string *type, bool bubble, bool cancelable)
{
assert(evt->doc != NULL);
lwc_string *str = NULL;
diff --git a/src/events/event_target.c b/src/events/event_target.c
index 5428557..6bf5458 100644
--- a/src/events/event_target.c
+++ b/src/events/event_target.c
@@ -72,7 +72,7 @@ void _dom_event_target_internal_finalise(struct dom_document *doc,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_event_target_add_event_listener(dom_event_target *et,
- struct dom_string *type, struct dom_event_listener *listener,
+ dom_string *type, struct dom_event_listener *listener,
bool capture)
{
struct listener_entry *le = NULL;
@@ -141,7 +141,7 @@ dom_exception _dom_event_target_add_event_listener(dom_event_target *et,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_event_target_remove_event_listener(dom_event_target *et,
- struct dom_string *type, struct dom_event_listener *listener,
+ dom_string *type, struct dom_event_listener *listener,
bool capture)
{
struct listener_entry *le = NULL;
@@ -244,7 +244,7 @@ dom_exception _dom_event_target_dispatch_event(dom_event_target *et,
return DOM_NO_ERR;
}
- struct dom_string *type = NULL;
+ dom_string *type = NULL;
err = _dom_document_create_string_from_lwcstring(doc, evt->type, &type);
if (err != DOM_NO_ERR)
return err;
@@ -389,7 +389,7 @@ cleanup:
* We don't support this API now, so it always return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_event_target_add_event_listener_ns(dom_event_target *et,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
struct dom_event_listener *listener, bool capture)
{
UNUSED(et);
@@ -414,7 +414,7 @@ dom_exception _dom_event_target_add_event_listener_ns(dom_event_target *et,
* We don't support this API now, so it always return DOM_NOT_SUPPORTED_ERR.
*/
dom_exception _dom_event_target_remove_event_listener_ns(dom_event_target *et,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
struct dom_event_listener *listener, bool capture)
{
UNUSED(et);
diff --git a/src/events/event_target.h b/src/events/event_target.h
index e6ad7b6..78808e3 100644
--- a/src/events/event_target.h
+++ b/src/events/event_target.h
@@ -17,7 +17,6 @@
#include "utils/hashtable.h"
struct dom_document;
-struct dom_string;
/**
* Listener Entry
@@ -72,13 +71,13 @@ dom_exception _dom_dispatch_node_change_event(struct dom_document *doc,
/* Dispatch a DOMCharacterDataModified event */
dom_exception _dom_dispatch_characterdata_modified_event(
struct dom_document *doc, dom_event_target *et,
- struct dom_string *prev, struct dom_string *new, bool *success);
+ dom_string *prev, dom_string *new, bool *success);
/* Dispatch a DOMAttrModified event */
dom_exception _dom_dispatch_attr_modified_event(struct dom_document *doc,
- dom_event_target *et, struct dom_string *prev,
- struct dom_string *new, dom_event_target *related,
- struct dom_string *attr_name, dom_mutation_type change,
+ dom_event_target *et, dom_string *prev,
+ dom_string *new, dom_event_target *related,
+ dom_string *attr_name, dom_mutation_type change,
bool *success);
/* Dispatch a DOMSubtreeModified event */
diff --git a/src/events/keyboard_event.c b/src/events/keyboard_event.c
index b8fc3ba..3e3b141 100644
--- a/src/events/keyboard_event.c
+++ b/src/events/keyboard_event.c
@@ -74,7 +74,7 @@ void _virtual_dom_keyboard_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_keyboard_event_get_key_identifier(dom_keyboard_event *evt,
- struct dom_string **ident)
+ dom_string **ident)
{
*ident = evt->key_ident;
dom_string_ref(*ident);
@@ -171,7 +171,7 @@ dom_exception _dom_keyboard_event_get_meta_key(dom_keyboard_event *evt,
* KeyboardEvent.keyLocation.
*/
dom_exception _dom_keyboard_event_get_modifier_state(dom_keyboard_event *evt,
- struct dom_string *m, bool *state)
+ dom_string *m, bool *state)
{
if (m == NULL) {
*state = false;
@@ -221,9 +221,9 @@ dom_exception _dom_keyboard_event_get_modifier_state(dom_keyboard_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_keyboard_event_init(dom_keyboard_event *evt,
- struct dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, struct dom_string *key_ident,
- dom_key_location key_loc, struct dom_string *modifier_list)
+ dom_string *type, bool bubble, bool cancelable,
+ struct dom_abstract_view *view, dom_string *key_ident,
+ dom_key_location key_loc, dom_string *modifier_list)
{
dom_exception err;
@@ -255,10 +255,10 @@ dom_exception _dom_keyboard_event_init(dom_keyboard_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_keyboard_event_init_ns(dom_keyboard_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- struct dom_string *key_ident, dom_key_location key_loc,
- struct dom_string *modifier_list)
+ dom_string *key_ident, dom_key_location key_loc,
+ dom_string *modifier_list)
{
dom_exception err;
@@ -284,7 +284,7 @@ dom_exception _dom_keyboard_event_init_ns(dom_keyboard_event *evt,
* \param modifier_state The returned state
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_parse_modifier_list(struct dom_string *modifier_list,
+dom_exception _dom_parse_modifier_list(dom_string *modifier_list,
uint32_t *modifier_state)
{
*modifier_state = 0;
diff --git a/src/events/keyboard_event.h b/src/events/keyboard_event.h
index 4d2777c..a988efc 100644
--- a/src/events/keyboard_event.h
+++ b/src/events/keyboard_event.h
@@ -18,7 +18,7 @@
struct dom_keyboard_event {
struct dom_ui_event base; /**< The base class */
- struct dom_string *key_ident; /**< The identifier of the key in this
+ dom_string *key_ident; /**< The identifier of the key in this
* event, please refer:
* http://www.w3.org/TR/DOM-Level-3-Events/keyset.html#KeySet-Set
* for detail
@@ -49,7 +49,7 @@ void _dom_keyboard_event_finalise(struct dom_document *doc,
/* Parse the modifier list string to corresponding bool variable state */
-dom_exception _dom_parse_modifier_list(struct dom_string *modifier_list,
+dom_exception _dom_parse_modifier_list(dom_string *modifier_list,
uint32_t *modifier_state);
#endif
diff --git a/src/events/mouse_event.c b/src/events/mouse_event.c
index 1b31012..7f61343 100644
--- a/src/events/mouse_event.c
+++ b/src/events/mouse_event.c
@@ -222,7 +222,7 @@ dom_exception _dom_mouse_event_get_related_target(dom_mouse_event *evt,
* KeyboardEvent.keyLocation.
*/
dom_exception _dom_mouse_event_get_modifier_state(dom_mouse_event *evt,
- struct dom_string *m, bool *state)
+ dom_string *m, bool *state)
{
if (m == NULL) {
*state = false;
@@ -278,7 +278,7 @@ dom_exception _dom_mouse_event_get_modifier_state(dom_mouse_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mouse_event_init(dom_mouse_event *evt,
- struct dom_string *type, bool bubble, bool cancelable,
+ 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, unsigned short button,
@@ -332,7 +332,7 @@ dom_exception _dom_mouse_event_init(dom_mouse_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mouse_event_init_ns(dom_mouse_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ 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,
diff --git a/src/events/mouse_multi_wheel_event.c b/src/events/mouse_multi_wheel_event.c
index bca9c97..6eccdab 100644
--- a/src/events/mouse_multi_wheel_event.c
+++ b/src/events/mouse_multi_wheel_event.c
@@ -126,12 +126,12 @@ dom_exception _dom_mouse_multi_wheel_event_get_wheel_delta_z(
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mouse_multi_wheel_event_init_ns(
- dom_mouse_multi_wheel_event *evt, struct dom_string *namespace,
- struct dom_string *type, bool bubble, bool cancelable,
+ 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,
unsigned short button, dom_event_target *et,
- struct dom_string *modifier_list, long wheel_delta_x,
+ dom_string *modifier_list, long wheel_delta_x,
long wheel_delta_y, long wheel_delta_z)
{
dom_exception err;
diff --git a/src/events/mouse_wheel_event.c b/src/events/mouse_wheel_event.c
index c38ae3e..c2ae111 100644
--- a/src/events/mouse_wheel_event.c
+++ b/src/events/mouse_wheel_event.c
@@ -92,12 +92,12 @@ dom_exception _dom_mouse_wheel_event_get_wheel_delta(
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mouse_wheel_event_init_ns(
- dom_mouse_wheel_event *evt, struct dom_string *namespace,
- struct dom_string *type, bool bubble, bool cancelable,
+ 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,
unsigned short button, dom_event_target *et,
- struct dom_string *modifier_list, long wheel_delta)
+ dom_string *modifier_list, long wheel_delta)
{
dom_exception err;
evt->delta = wheel_delta;
diff --git a/src/events/mutation_event.c b/src/events/mutation_event.c
index c24ae15..ecc9794 100644
--- a/src/events/mutation_event.c
+++ b/src/events/mutation_event.c
@@ -98,7 +98,7 @@ dom_exception _dom_mutation_event_get_related_node(dom_mutation_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mutation_event_get_prev_value(dom_mutation_event *evt,
- struct dom_string **ret)
+ dom_string **ret)
{
*ret = evt->prev_value;
dom_string_ref(*ret);
@@ -114,7 +114,7 @@ dom_exception _dom_mutation_event_get_prev_value(dom_mutation_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mutation_event_get_new_value(dom_mutation_event *evt,
- struct dom_string **ret)
+ dom_string **ret)
{
*ret = evt->new_value;
dom_string_ref(*ret);
@@ -130,7 +130,7 @@ dom_exception _dom_mutation_event_get_new_value(dom_mutation_event *evt,
* \return DOM_NO_ERR.
*/
dom_exception _dom_mutation_event_get_attr_name(dom_mutation_event *evt,
- struct dom_string **ret)
+ dom_string **ret)
{
*ret = evt->attr_name;
dom_string_ref(*ret);
@@ -168,9 +168,9 @@ dom_exception _dom_mutation_event_get_attr_change(dom_mutation_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mutation_event_init(dom_mutation_event *evt,
- struct dom_string *type, bool bubble, bool cancelable,
- struct dom_node *node, struct dom_string *prev_value,
- struct dom_string *new_value, struct dom_string *attr_name,
+ dom_string *type, bool bubble, bool cancelable,
+ struct dom_node *node, dom_string *prev_value,
+ dom_string *new_value, dom_string *attr_name,
dom_mutation_type change)
{
evt->related_node = node;
@@ -206,10 +206,10 @@ dom_exception _dom_mutation_event_init(dom_mutation_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mutation_event_init_ns(dom_mutation_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_node *node,
- struct dom_string *prev_value, struct dom_string *new_value,
- struct dom_string *attr_name, dom_mutation_type change)
+ dom_string *prev_value, dom_string *new_value,
+ dom_string *attr_name, dom_mutation_type change)
{
evt->related_node = node;
dom_node_ref(node);
diff --git a/src/events/mutation_event.h b/src/events/mutation_event.h
index d6cd733..58ae9fb 100644
--- a/src/events/mutation_event.h
+++ b/src/events/mutation_event.h
@@ -19,9 +19,9 @@ struct dom_mutation_event {
struct dom_event base;
struct dom_node *related_node;
- struct dom_string *prev_value;
- struct dom_string *new_value;
- struct dom_string *attr_name;
+ dom_string *prev_value;
+ dom_string *new_value;
+ dom_string *attr_name;
dom_mutation_type change;
};
diff --git a/src/events/mutation_name_event.c b/src/events/mutation_name_event.c
index 34b9288..d7c14e4 100644
--- a/src/events/mutation_name_event.c
+++ b/src/events/mutation_name_event.c
@@ -76,7 +76,7 @@ void _virtual_dom_mutation_name_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_mutation_name_event_get_prev_namespace(
- dom_mutation_name_event *evt, struct dom_string **namespace)
+ dom_mutation_name_event *evt, dom_string **namespace)
{
*namespace = evt->prev_namespace;
dom_string_ref(*namespace);
@@ -92,7 +92,7 @@ dom_exception _dom_mutation_name_event_get_prev_namespace(
* \return DOM_NO_ERR.
*/
dom_exception _dom_mutation_name_event_get_prev_node_name(
- dom_mutation_name_event *evt, struct dom_string **name)
+ dom_mutation_name_event *evt, dom_string **name)
{
*name = evt->prev_nodename;
dom_string_ref(*name);
@@ -113,9 +113,9 @@ dom_exception _dom_mutation_name_event_get_prev_node_name(
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mutation_name_event_init(dom_mutation_name_event *evt,
- struct dom_string *type, bool bubble, bool cancelable,
- struct dom_node *node, struct dom_string *prev_ns,
- struct dom_string *prev_name)
+ dom_string *type, bool bubble, bool cancelable,
+ struct dom_node *node, dom_string *prev_ns,
+ dom_string *prev_name)
{
evt->prev_namespace = prev_ns;
dom_string_ref(prev_ns);
@@ -142,9 +142,9 @@ dom_exception _dom_mutation_name_event_init(dom_mutation_name_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_mutation_name_event_init_ns(dom_mutation_name_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_node *node,
- struct dom_string *prev_ns, struct dom_string *prev_name)
+ dom_string *prev_ns, dom_string *prev_name)
{
evt->prev_namespace = prev_ns;
dom_string_ref(prev_ns);
diff --git a/src/events/mutation_name_event.h b/src/events/mutation_name_event.h
index 2ba74de..94b35a2 100644
--- a/src/events/mutation_name_event.h
+++ b/src/events/mutation_name_event.h
@@ -18,8 +18,8 @@
struct dom_mutation_name_event {
struct dom_mutation_event base;
- struct dom_string *prev_namespace;
- struct dom_string *prev_nodename;
+ dom_string *prev_namespace;
+ dom_string *prev_nodename;
};
/* Constructor */
diff --git a/src/events/text_event.c b/src/events/text_event.c
index 24c921a..591da57 100644
--- a/src/events/text_event.c
+++ b/src/events/text_event.c
@@ -69,7 +69,7 @@ void _virtual_dom_text_event_destroy(struct dom_event *evt)
* \return DOM_NO_ERR.
*/
dom_exception _dom_text_event_get_data(dom_text_event *evt,
- struct dom_string **data)
+ dom_string **data)
{
*data = evt->data;
dom_string_ref(*data);
@@ -89,8 +89,8 @@ dom_exception _dom_text_event_get_data(dom_text_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_text_event_init(dom_text_event *evt,
- struct dom_string *type, bool bubble, bool cancelable,
- struct dom_abstract_view *view, struct dom_string *data)
+ dom_string *type, bool bubble, bool cancelable,
+ struct dom_abstract_view *view, dom_string *data)
{
evt->data = data;
dom_string_ref(data);
@@ -112,9 +112,9 @@ dom_exception _dom_text_event_init(dom_text_event *evt,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_text_event_init_ns(dom_text_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
- struct dom_string *data)
+ dom_string *data)
{
evt->data = data;
dom_string_ref(data);
diff --git a/src/events/text_event.h b/src/events/text_event.h
index 754a4f6..a50bf32 100644
--- a/src/events/text_event.h
+++ b/src/events/text_event.h
@@ -17,7 +17,7 @@
*/
struct dom_text_event {
struct dom_ui_event base;
- struct dom_string *data;
+ dom_string *data;
};
/* Constructor */
diff --git a/src/events/ui_event.c b/src/events/ui_event.c
index f18e44f..0be2980 100644
--- a/src/events/ui_event.c
+++ b/src/events/ui_event.c
@@ -102,7 +102,7 @@ dom_exception _dom_ui_event_get_detail(dom_ui_event *evt,
* \param detail The detail object
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
-dom_exception _dom_ui_event_init(dom_ui_event *evt, struct dom_string *type,
+dom_exception _dom_ui_event_init(dom_ui_event *evt, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
long detail)
{
@@ -125,7 +125,7 @@ dom_exception _dom_ui_event_init(dom_ui_event *evt, struct dom_string *type,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_ui_event_init_ns(dom_ui_event *evt,
- struct dom_string *namespace, struct dom_string *type,
+ dom_string *namespace, dom_string *type,
bool bubble, bool cancelable, struct dom_abstract_view *view,
long detail)
{
diff --git a/src/html/html_base_element.c b/src/html/html_base_element.c
index f8aa14e..dad0985 100644
--- a/src/html/html_base_element.c
+++ b/src/html/html_base_element.c
@@ -96,8 +96,8 @@ void _dom_html_base_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_base_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_base_element.h b/src/html/html_base_element.h
index 7e58cc2..c9143f5 100644
--- a/src/html/html_base_element.h
+++ b/src/html/html_base_element.h
@@ -35,8 +35,8 @@ void _dom_html_base_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_base_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_base_element_destroy(dom_node_internal *node);
dom_exception _dom_html_base_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_body_element.c b/src/html/html_body_element.c
index 7512910..afe8ee4 100644
--- a/src/html/html_body_element.c
+++ b/src/html/html_body_element.c
@@ -96,8 +96,8 @@ void _dom_html_body_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_body_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_body_element.h b/src/html/html_body_element.h
index e62ff78..ccb6091 100644
--- a/src/html/html_body_element.h
+++ b/src/html/html_body_element.h
@@ -35,8 +35,8 @@ void _dom_html_body_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_body_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_body_element_destroy(dom_node_internal *node);
dom_exception _dom_html_body_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_collection.c b/src/html/html_collection.c
index e0c96b9..9b34c51 100644
--- a/src/html/html_collection.c
+++ b/src/html/html_collection.c
@@ -206,7 +206,7 @@ dom_exception dom_html_collection_item(dom_html_collection *col,
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_collection_named_item(dom_html_collection *col,
- struct dom_string *name, struct dom_node **node)
+ dom_string *name, struct dom_node **node)
{
struct dom_node_internal *n = col->root;
dom_exception err;
diff --git a/src/html/html_document.c b/src/html/html_document.c
index a2845aa..6b9eb5c 100644
--- a/src/html/html_document.c
+++ b/src/html/html_document.c
@@ -72,7 +72,7 @@ dom_exception dom_html_document_complete(void);
* as the returned title.
*/
dom_exception dom_html_document_get_title(dom_html_document *doc,
- struct dom_string **title)
+ dom_string **title)
{
UNUSED(doc);
UNUSED(title);
@@ -81,13 +81,13 @@ dom_exception dom_html_document_get_title(dom_html_document *doc,
}
dom_exception dom_html_document_set_title(dom_html_document *doc,
- struct dom_string *title);
+ dom_string *title);
dom_exception dom_html_document_get_referer(dom_html_document *doc,
- struct dom_string **referer);
+ dom_string **referer);
dom_exception dom_html_document_get_domain(dom_html_document *doc,
- struct dom_string **domain);
+ dom_string **domain);
dom_exception dom_html_document_get_url(dom_html_document *doc,
- struct dom_string **url);
+ dom_string **url);
dom_exception dom_html_document_get_body(dom_html_document *doc,
struct dom_html_element **body);
dom_exception dom_html_document_set_body(dom_html_document *doc,
@@ -103,16 +103,16 @@ dom_exception dom_html_document_get_forms(dom_html_document *doc,
dom_exception dom_html_document_get_anchors(dom_html_document *doc,
struct dom_html_collection **col);
dom_exception dom_html_document_get_cookie(dom_html_document *doc,
- struct dom_string **cookie);
+ dom_string **cookie);
dom_exception dom_html_document_set_cookie(dom_html_document *doc,
- struct dom_string *cookie);
+ dom_string *cookie);
dom_exception dom_html_document_open(dom_html_document *doc);
dom_exception dom_html_document_close(dom_html_document *doc);
dom_exception dom_html_document_write(dom_html_document *doc,
- struct dom_string *text);
+ dom_string *text);
dom_exception dom_html_document_writeln(dom_html_document *doc,
- struct dom_string *text);
+ dom_string *text);
dom_exception dom_html_document_get_elements_by_name(dom_html_document *doc,
- struct dom_string *name, struct dom_nodelist **list);
+ dom_string *name, struct dom_nodelist **list);
diff --git a/src/html/html_document.h b/src/html/html_document.h
index 31770ef..27f5cf9 100644
--- a/src/html/html_document.h
+++ b/src/html/html_document.h
@@ -26,11 +26,11 @@ struct dom_html_document {
} parser;
/**< The underlaying parser of this document */
- struct dom_string *title; /**< HTML document title */
- struct dom_string *referer; /**< HTML document referer */
- struct dom_string *domain; /**< HTML document domain */
- struct dom_string *url; /**< HTML document URL */
- struct dom_string *cookie; /**< HTML document cookie */
+ dom_string *title; /**< HTML document title */
+ dom_string *referer; /**< HTML document referer */
+ dom_string *domain; /**< HTML document domain */
+ dom_string *url; /**< HTML document URL */
+ dom_string *cookie; /**< HTML document cookie */
};
/* Initialise a HTMLDocument */
diff --git a/src/html/html_element.c b/src/html/html_element.c
index decf955..3552c67 100644
--- a/src/html/html_element.c
+++ b/src/html/html_element.c
@@ -71,7 +71,7 @@ dom_exception _dom_html_element_copy(struct dom_node_internal *new,
/* API functions */
dom_exception _dom_html_element_get_id(dom_html_element *element,
- struct dom_string **id)
+ dom_string **id)
{
dom_exception ret;
dom_document *doc;
@@ -94,7 +94,7 @@ dom_exception _dom_html_element_get_id(dom_html_element *element,
}
dom_exception _dom_html_element_set_id(dom_html_element *element,
- struct dom_string *id)
+ dom_string *id)
{
dom_exception ret;
dom_document *doc;
diff --git a/src/html/html_element.h b/src/html/html_element.h
index d0691d6..2a433a8 100644
--- a/src/html/html_element.h
+++ b/src/html/html_element.h
@@ -43,9 +43,9 @@ dom_exception _dom_html_element_copy(struct dom_node_internal *new,
/* The API functions */
dom_exception _dom_html_element_get_id(dom_html_element *element,
- struct dom_string **id);
+ dom_string **id);
dom_exception _dom_html_element_set_id(dom_html_element *element,
- struct dom_string *id);
+ dom_string *id);
/* Some common functions used by all child classes */
dom_exception dom_html_element_get_bool_property(dom_html_element *ele,
diff --git a/src/html/html_form_element.c b/src/html/html_form_element.c
index 7c0e9af..1b6ab91 100644
--- a/src/html/html_form_element.c
+++ b/src/html/html_form_element.c
@@ -104,8 +104,8 @@ void _dom_html_form_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_form_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_form_element.h b/src/html/html_form_element.h
index 9b8105d..dd1482b 100644
--- a/src/html/html_form_element.h
+++ b/src/html/html_form_element.h
@@ -39,8 +39,8 @@ void _dom_html_form_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_form_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_form_element_destroy(dom_node_internal *node);
dom_exception _dom_html_form_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_head_element.c b/src/html/html_head_element.c
index 9ab53b6..a37acfe 100644
--- a/src/html/html_head_element.c
+++ b/src/html/html_head_element.c
@@ -96,8 +96,8 @@ void _dom_html_head_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_head_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_head_element.h b/src/html/html_head_element.h
index d92c656..bb58720 100644
--- a/src/html/html_head_element.h
+++ b/src/html/html_head_element.h
@@ -35,8 +35,8 @@ void _dom_html_head_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_head_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_head_element_destroy(dom_node_internal *node);
dom_exception _dom_html_head_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_html_element.c b/src/html/html_html_element.c
index 8e08382..2da67f6 100644
--- a/src/html/html_html_element.c
+++ b/src/html/html_html_element.c
@@ -96,8 +96,8 @@ void _dom_html_html_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_html_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_html_element.h b/src/html/html_html_element.h
index 4e81d18..4ffc9ba 100644
--- a/src/html/html_html_element.h
+++ b/src/html/html_html_element.h
@@ -35,8 +35,8 @@ void _dom_html_html_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_html_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_html_element_destroy(dom_node_internal *node);
dom_exception _dom_html_html_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_isindex_element.c b/src/html/html_isindex_element.c
index 42db2e5..295ee38 100644
--- a/src/html/html_isindex_element.c
+++ b/src/html/html_isindex_element.c
@@ -103,8 +103,8 @@ void _dom_html_isindex_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_isindex_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_isindex_element.h b/src/html/html_isindex_element.h
index 3aad119..b64c6c0 100644
--- a/src/html/html_isindex_element.h
+++ b/src/html/html_isindex_element.h
@@ -37,8 +37,8 @@ void _dom_html_isindex_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_isindex_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_isindex_element_destroy(dom_node_internal *node);
dom_exception _dom_html_isindex_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_link_element.c b/src/html/html_link_element.c
index ce0d6ac..b7b143c 100644
--- a/src/html/html_link_element.c
+++ b/src/html/html_link_element.c
@@ -130,8 +130,8 @@ dom_exception dom_html_link_element_set_disabled(dom_html_link_element *ele,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_link_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_link_element.h b/src/html/html_link_element.h
index 4c6fe55..613665b 100644
--- a/src/html/html_link_element.h
+++ b/src/html/html_link_element.h
@@ -35,8 +35,8 @@ void _dom_html_link_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_link_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_link_element_destroy(dom_node_internal *node);
dom_exception _dom_html_link_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_meta_element.c b/src/html/html_meta_element.c
index a525e13..92b293b 100644
--- a/src/html/html_meta_element.c
+++ b/src/html/html_meta_element.c
@@ -96,8 +96,8 @@ void _dom_html_meta_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_meta_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_meta_element.h b/src/html/html_meta_element.h
index 2f50719..6574913 100644
--- a/src/html/html_meta_element.h
+++ b/src/html/html_meta_element.h
@@ -35,8 +35,8 @@ void _dom_html_meta_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_meta_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_meta_element_destroy(dom_node_internal *node);
dom_exception _dom_html_meta_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_options_collection.c b/src/html/html_options_collection.c
index 8b4c7bb..0b80df2 100644
--- a/src/html/html_options_collection.c
+++ b/src/html/html_options_collection.c
@@ -140,7 +140,7 @@ dom_exception dom_html_options_collection_item(dom_html_options_collection *col,
* \return DOM_NO_ERR on success.
*/
dom_exception dom_html_options_collection_named_item(dom_html_options_collection *col,
- struct dom_string *name, struct dom_node **node)
+ dom_string *name, struct dom_node **node)
{
return dom_html_collection_named_item(&col->base, name, node);
}
diff --git a/src/html/html_select_element.c b/src/html/html_select_element.c
index f4e54cb..134df3e 100644
--- a/src/html/html_select_element.c
+++ b/src/html/html_select_element.c
@@ -102,8 +102,8 @@ void _dom_html_select_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_select_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_select_element.h b/src/html/html_select_element.h
index 28b4956..acaa929 100644
--- a/src/html/html_select_element.h
+++ b/src/html/html_select_element.h
@@ -40,8 +40,8 @@ void _dom_html_select_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_select_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_select_element_destroy(dom_node_internal *node);
dom_exception _dom_html_select_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_style_element.c b/src/html/html_style_element.c
index 288b1cf..b39995a 100644
--- a/src/html/html_style_element.c
+++ b/src/html/html_style_element.c
@@ -96,8 +96,8 @@ void _dom_html_style_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_style_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
diff --git a/src/html/html_style_element.h b/src/html/html_style_element.h
index 3ac8cf5..b20acb0 100644
--- a/src/html/html_style_element.h
+++ b/src/html/html_style_element.h
@@ -35,8 +35,8 @@ void _dom_html_style_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_style_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_style_element_destroy(dom_node_internal *node);
dom_exception _dom_html_style_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/html/html_title_element.c b/src/html/html_title_element.c
index c914d4a..1a440b1 100644
--- a/src/html/html_title_element.c
+++ b/src/html/html_title_element.c
@@ -101,8 +101,8 @@ void _dom_html_title_element_destroy(struct dom_document *doc,
/* The virtual function used to parse attribute value, see src/core/element.c
* for detail */
dom_exception _dom_html_title_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed)
+ dom_string *name, dom_string *value,
+ dom_string **parsed)
{
UNUSED(ele);
UNUSED(name);
@@ -151,7 +151,7 @@ dom_exception _dom_html_title_element_copy(struct dom_node_internal *new,
* \return DOM_NO_ERR on success, appropriated dom_exception on failure.
*/
dom_exception dom_html_title_element_get_text(dom_html_title_element *ele,
- struct dom_string **text)
+ dom_string **text)
{
dom_node_internal *node = (dom_node_internal *) ele;
dom_node_internal *n = node->first_child;
@@ -172,7 +172,7 @@ dom_exception dom_html_title_element_get_text(dom_html_title_element *ele,
* \return DOM_NO_ERR on success, appropriated dom_exception on failure.
*/
dom_exception dom_html_title_element_set_text(dom_html_title_element *ele,
- struct dom_string *text)
+ dom_string *text)
{
dom_node_internal *node = (dom_node_internal *) ele;
dom_node_internal *n = node->first_child;
diff --git a/src/html/html_title_element.h b/src/html/html_title_element.h
index 1433189..87dabd8 100644
--- a/src/html/html_title_element.h
+++ b/src/html/html_title_element.h
@@ -35,8 +35,8 @@ void _dom_html_title_element_destroy(struct dom_document *doc,
/* The protected virtual functions */
dom_exception _dom_html_title_element_parse_attribute(dom_element *ele,
- struct dom_string *name, struct dom_string *value,
- struct dom_string **parsed);
+ dom_string *name, dom_string *value,
+ dom_string **parsed);
void _dom_virtual_html_title_element_destroy(dom_node_internal *node);
dom_exception _dom_html_title_element_alloc(struct dom_document *doc,
struct dom_node_internal *n, struct dom_node_internal **ret);
diff --git a/src/utils/namespace.c b/src/utils/namespace.c
index 3290b3f..2b14d72 100644
--- a/src/utils/namespace.c
+++ b/src/utils/namespace.c
@@ -16,9 +16,9 @@
/** XML prefix */
-static struct dom_string *xml;
+static dom_string *xml;
/** XMLNS prefix */
-static struct dom_string *xmlns;
+static dom_string *xmlns;
/* The namespace strings */
static const char *namespaces[DOM_NAMESPACE_COUNT] = {
@@ -31,7 +31,7 @@ static const char *namespaces[DOM_NAMESPACE_COUNT] = {
"http://www.w3.org/2000/xmlns/"
};
-struct dom_string *dom_namespaces[DOM_NAMESPACE_COUNT] = {
+dom_string *dom_namespaces[DOM_NAMESPACE_COUNT] = {
NULL,
};
@@ -129,8 +129,8 @@ dom_exception _dom_namespace_finalise(void)
* ::qname is not (or is not prefixed by)
* "xmlns".
*/
-dom_exception _dom_namespace_validate_qname(struct dom_string *qname,
- struct dom_string *namespace)
+dom_exception _dom_namespace_validate_qname(dom_string *qname,
+ dom_string *namespace)
{
uint32_t colon, len;
@@ -171,8 +171,8 @@ dom_exception _dom_namespace_validate_qname(struct dom_string *qname,
return DOM_NAMESPACE_ERR;
} else {
/* Prefix */
- struct dom_string *prefix;
- struct dom_string *lname;
+ dom_string *prefix;
+ dom_string *lname;
dom_exception err;
/* Ensure there is a namespace URI */
@@ -238,8 +238,8 @@ dom_exception _dom_namespace_validate_qname(struct dom_string *qname,
* ::prefix and ::localname will be referenced. The caller should unreference
* them once finished.
*/
-dom_exception _dom_namespace_split_qname(struct dom_string *qname,
- struct dom_string **prefix, struct dom_string **localname)
+dom_exception _dom_namespace_split_qname(dom_string *qname,
+ dom_string **prefix, dom_string **localname)
{
uint32_t colon;
dom_exception err;
diff --git a/src/utils/namespace.h b/src/utils/namespace.h
index 900c9ee..221e9da 100644
--- a/src/utils/namespace.h
+++ b/src/utils/namespace.h
@@ -10,10 +10,9 @@
#include <dom/functypes.h>
#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
struct dom_document;
-struct dom_string;
-
/* Initialise the namespace component */
dom_exception _dom_namespace_initialise(dom_alloc alloc, void *pw);
@@ -22,18 +21,18 @@ dom_exception _dom_namespace_initialise(dom_alloc alloc, void *pw);
dom_exception _dom_namespace_finalise(void);
/* Ensure a QName is valid */
-dom_exception _dom_namespace_validate_qname(struct dom_string *qname,
- struct dom_string *namespace);
+dom_exception _dom_namespace_validate_qname(dom_string *qname,
+ dom_string *namespace);
/* Split a QName into a namespace prefix and localname string */
-dom_exception _dom_namespace_split_qname(struct dom_string *qname,
- struct dom_string **prefix, struct dom_string **localname);
+dom_exception _dom_namespace_split_qname(dom_string *qname,
+ dom_string **prefix, dom_string **localname);
/* Get the XML prefix dom_string */
-struct dom_string *_dom_namespace_get_xml_prefix(void);
+dom_string *_dom_namespace_get_xml_prefix(void);
/* Get the XMLNS prefix dom_string */
-struct dom_string *_dom_namespace_get_xmlns_prefix(void);
+dom_string *_dom_namespace_get_xmlns_prefix(void);
#endif
diff --git a/src/utils/resource_mgr.c b/src/utils/resource_mgr.c
index 98270ee..ccaf015 100644
--- a/src/utils/resource_mgr.c
+++ b/src/utils/resource_mgr.c
@@ -38,7 +38,7 @@ void *_dom_resource_mgr_alloc(struct dom_resource_mgr *res, void *ptr,
* \return DOM_NO_ERR on success, appropriate dom_exception on failure.
*/
dom_exception _dom_resource_mgr_create_string(struct dom_resource_mgr *res,
- const uint8_t *data, size_t len, struct dom_string **result)
+ const uint8_t *data, size_t len, dom_string **result)
{
return dom_string_create(res->alloc, res->pw, data, len, result);
}
@@ -74,7 +74,7 @@ dom_exception _dom_resource_mgr_create_lwcstring(struct dom_resource_mgr *res,
*/
dom_exception _dom_resource_mgr_create_string_from_lwcstring(
struct dom_resource_mgr *res, struct lwc_string_s *str,
- struct dom_string **result)
+ dom_string **result)
{
return _dom_string_create_from_lwcstring(res->alloc, res->pw,
str, result);
diff --git a/src/utils/resource_mgr.h b/src/utils/resource_mgr.h
index 608df53..1b604ec 100644
--- a/src/utils/resource_mgr.h
+++ b/src/utils/resource_mgr.h
@@ -10,11 +10,11 @@
#include <dom/functypes.h>
#include <dom/core/exceptions.h>
+#include <dom/core/string.h>
#include "hashtable.h"
struct lwc_string_s;
-struct dom_string;
/**
* Resource manager
@@ -28,14 +28,14 @@ void *_dom_resource_mgr_alloc(struct dom_resource_mgr *res, void *ptr,
size_t size);
dom_exception _dom_resource_mgr_create_string(struct dom_resource_mgr *res,
- const uint8_t *data, size_t len, struct dom_string **result);
+ const uint8_t *data, size_t len, dom_string **result);
dom_exception _dom_resource_mgr_create_lwcstring(struct dom_resource_mgr *res,
const uint8_t *data, size_t len, struct lwc_string_s **result);
dom_exception _dom_resource_mgr_create_string_from_lwcstring(
struct dom_resource_mgr *res, struct lwc_string_s *str,
- struct dom_string **result);
+ dom_string **result);
dom_exception _dom_resource_mgr_create_hashtable(struct dom_resource_mgr *res,
size_t chains, dom_hash_func f, struct dom_hash_table **ht);
diff --git a/src/utils/validate.c b/src/utils/validate.c
index eb6cb22..ac0bcd1 100644
--- a/src/utils/validate.c
+++ b/src/utils/validate.c
@@ -99,7 +99,7 @@ static bool is_name_char(uint32_t ch)
* \param name The name need to be tested
* \return true if ::name is valid, false otherwise.
*/
-bool _dom_validate_name(struct dom_string *name)
+bool _dom_validate_name(dom_string *name)
{
uint32_t ch, len, i;
dom_exception err;
@@ -139,7 +139,7 @@ bool _dom_validate_name(struct dom_string *name)
* \param str The name to validate
* \return true if ::name is valid, false otherwise.
*/
-bool _dom_validate_ncname(struct dom_string *name)
+bool _dom_validate_ncname(dom_string *name)
{
uint32_t ch, len, i;
dom_exception err;
diff --git a/src/utils/validate.h b/src/utils/validate.h
index 5d375e7..7318653 100644
--- a/src/utils/validate.h
+++ b/src/utils/validate.h
@@ -16,11 +16,10 @@
#define dom_utils_valid_h_
#include <stdbool.h>
+#include <dom/core/string.h>
-struct dom_string;
-
-bool _dom_validate_name(struct dom_string *name);
-bool _dom_validate_ncname(struct dom_string *name);
+bool _dom_validate_name(dom_string *name);
+bool _dom_validate_ncname(dom_string *name);
#endif