You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sh...@apache.org on 2009/08/18 13:08:44 UTC
svn commit: r805360 [3/13] - in /webservices/axis2/trunk/c/axiom/src:
attachments/ om/ parser/ parser/guththila/ parser/libxml2/ soap/ util/ xpath/
Modified: webservices/axis2/trunk/c/axiom/src/om/om_attribute.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_attribute.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_attribute.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_attribute.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -50,9 +49,8 @@
/* localname is mandatory */
AXIS2_PARAM_CHECK(env->error, localname, NULL);
- attribute = (axiom_attribute_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_attribute_t));
- if (!attribute)
+ attribute = (axiom_attribute_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_attribute_t));
+ if(!attribute)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -65,16 +63,16 @@
attribute->qname = NULL;
attribute->localname = axutil_string_create(env, localname);
- if (!(attribute->localname))
+ if(!(attribute->localname))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_FREE(env->allocator, attribute);
return NULL;
}
- if (value)
+ if(value)
{
attribute->value = axutil_string_create(env, value);
- if (!(attribute->value))
+ if(!(attribute->value))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
axutil_string_free(attribute->localname, env);
@@ -94,22 +92,22 @@
axiom_attribute_t * attribute,
const axutil_env_t * env)
{
- if (--attribute->ref > 0)
+ if(--attribute->ref > 0)
{
return;
}
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (attribute->localname)
+ if(attribute->localname)
{
axutil_string_free(attribute->localname, env);
}
- if (attribute->value)
+ if(attribute->value)
{
axutil_string_free(attribute->value, env);
}
- if (attribute->qname)
+ if(attribute->qname)
{
axutil_qname_free(attribute->qname, env);
}
@@ -127,7 +125,7 @@
axiom_attribute_t *om_attribute_l = NULL;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- om_attribute_l = (axiom_attribute_t *) attribute;
+ om_attribute_l = (axiom_attribute_t *)attribute;
axiom_attribute_free(om_attribute_l, env);
return;
}
@@ -139,26 +137,18 @@
{
axutil_qname_t *qname = NULL;
AXIS2_ENV_CHECK(env, NULL);
- if (!(attribute->qname))
+ if(!(attribute->qname))
{
- if (attribute->ns)
+ if(attribute->ns)
{
- qname = axutil_qname_create(env,
- axutil_string_get_buffer(attribute->
- localname,
- env),
- axiom_namespace_get_uri(attribute->ns,
- env),
- axiom_namespace_get_prefix(attribute->
- ns, env));
+ qname = axutil_qname_create(env, axutil_string_get_buffer(attribute-> localname, env),
+ axiom_namespace_get_uri(attribute->ns, env), axiom_namespace_get_prefix(
+ attribute-> ns, env));
}
else
{
- qname = axutil_qname_create(env,
- axutil_string_get_buffer(attribute->
- localname,
- env), NULL,
- NULL);
+ qname = axutil_qname_create(env, axutil_string_get_buffer(attribute-> localname, env),
+ NULL, NULL);
}
attribute->qname = qname;
return qname;
@@ -177,7 +167,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
- if (attribute->ns)
+ if(attribute->ns)
{
axis2_char_t *uri = NULL;
axis2_char_t *prefix = NULL;
@@ -185,34 +175,23 @@
uri = axiom_namespace_get_uri(attribute->ns, env);
prefix = axiom_namespace_get_prefix(attribute->ns, env);
- if ((uri) && (NULL != prefix) && (axutil_strcmp(prefix, "") != 0))
+ if((uri) && (NULL != prefix) && (axutil_strcmp(prefix, "") != 0))
{
status = axiom_output_write(om_output, env, AXIOM_ATTRIBUTE, 4,
- axutil_string_get_buffer(attribute->
- localname,
- env),
- axutil_string_get_buffer(attribute->
- value, env),
- uri, prefix);
+ axutil_string_get_buffer(attribute-> localname, env), axutil_string_get_buffer(
+ attribute-> value, env), uri, prefix);
}
- else if (uri)
+ else if(uri)
{
status = axiom_output_write(om_output, env, AXIOM_ATTRIBUTE, 3,
- axutil_string_get_buffer(attribute->
- localname,
- env),
- axutil_string_get_buffer(attribute->
- value, env),
- uri);
+ axutil_string_get_buffer(attribute-> localname, env), axutil_string_get_buffer(
+ attribute-> value, env), uri);
}
}
else
{
- status = axiom_output_write(om_output, env, AXIOM_ATTRIBUTE, 2,
- axutil_string_get_buffer(attribute->
- localname, env),
- axutil_string_get_buffer(attribute->value,
- env));
+ status = axiom_output_write(om_output, env, AXIOM_ATTRIBUTE, 2, axutil_string_get_buffer(
+ attribute-> localname, env), axutil_string_get_buffer(attribute->value, env));
}
return status;
}
@@ -222,10 +201,9 @@
axiom_attribute_t * attribute,
const axutil_env_t * env)
{
- if (attribute->localname)
+ if(attribute->localname)
{
- return (axis2_char_t *) axutil_string_get_buffer(attribute->localname,
- env);
+ return (axis2_char_t *)axutil_string_get_buffer(attribute->localname, env);
}
return NULL;
}
@@ -235,9 +213,9 @@
axiom_attribute_t * attribute,
const axutil_env_t * env)
{
- if (attribute->value)
+ if(attribute->value)
{
- return (axis2_char_t *) axutil_string_get_buffer(attribute->value, env);
+ return (axis2_char_t *)axutil_string_get_buffer(attribute->value, env);
}
return NULL;
}
@@ -260,7 +238,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
- if (attribute->localname)
+ if(attribute->localname)
{
axutil_string_free(attribute->localname, env);
attribute->localname = NULL;
@@ -268,7 +246,7 @@
attribute->localname = axutil_string_create(env, localname);
- if (!(attribute->localname))
+ if(!(attribute->localname))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -286,14 +264,14 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
- if (attribute->value)
+ if(attribute->value)
{
axutil_string_free(attribute->value, env);
attribute->value = NULL;
}
attribute->value = axutil_string_create(env, value);
- if (!(attribute->value))
+ if(!(attribute->value))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
@@ -319,15 +297,14 @@
const axutil_env_t * env)
{
axiom_attribute_t *cloned_attr = NULL;
- if (!attribute)
+ if(!attribute)
return NULL;
AXIS2_ENV_CHECK(env, NULL);
/** namespace is not cloned since it is a shollow copy*/
- cloned_attr = axiom_attribute_create_str(env,
- attribute->localname,
- attribute->value, attribute->ns);
- if (cloned_attr)
+ cloned_attr = axiom_attribute_create_str(env, attribute->localname, attribute->value,
+ attribute->ns);
+ if(cloned_attr)
{
return cloned_attr;
}
@@ -357,9 +334,8 @@
/* localname is mandatory */
AXIS2_PARAM_CHECK(env->error, localname, NULL);
- attribute = (axiom_attribute_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_attribute_t));
- if (!attribute)
+ attribute = (axiom_attribute_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_attribute_t));
+ if(!attribute)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -372,16 +348,16 @@
attribute->qname = NULL;
attribute->localname = axutil_string_clone(localname, env);
- if (!(attribute->localname))
+ if(!(attribute->localname))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
AXIS2_FREE(env->allocator, attribute);
return NULL;
}
- if (value)
+ if(value)
{
attribute->value = axutil_string_clone(value, env);
- if (!(attribute->value))
+ if(!(attribute->value))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
axutil_string_free(attribute->localname, env);
@@ -421,7 +397,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, localname, AXIS2_FAILURE);
- if (attribute->localname)
+ if(attribute->localname)
{
axutil_string_free(attribute->localname, env);
attribute->localname = NULL;
@@ -441,14 +417,14 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
- if (attribute->value)
+ if(attribute->value)
{
axutil_string_free(attribute->value, env);
attribute->value = NULL;
}
attribute->value = axutil_string_clone(value, env);
- if (!(attribute->value))
+ if(!(attribute->value))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return AXIS2_FAILURE;
Modified: webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_child_element_iterator.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -34,11 +33,10 @@
axiom_child_element_iterator_t *iterator = NULL;
AXIS2_ENV_CHECK(env, NULL);
- iterator = (axiom_child_element_iterator_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axiom_child_element_iterator_t));
+ iterator = (axiom_child_element_iterator_t *)AXIS2_MALLOC(env->allocator,
+ sizeof(axiom_child_element_iterator_t));
- if (!iterator)
+ if(!iterator)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -62,28 +60,30 @@
return;
}
-AXIS2_EXTERN axis2_status_t AXIS2_CALL axiom_child_element_iterator_remove(
+AXIS2_EXTERN axis2_status_t AXIS2_CALL
+axiom_child_element_iterator_remove(
axiom_child_element_iterator_t * iterator,
const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, iterator, AXIS2_FAILURE);
- if (!(iterator->next_called))
+ if(!(iterator->next_called))
return AXIS2_FAILURE;
- if (iterator->remove_called)
+ if(iterator->remove_called)
return AXIS2_FAILURE;
iterator->remove_called = AXIS2_TRUE;
- if (!(iterator->last_child))
+ if(!(iterator->last_child))
return AXIS2_FAILURE;
axiom_node_free_tree(iterator->last_child, env);
iterator->last_child = NULL;
return AXIS2_SUCCESS;
}
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL axiom_child_element_iterator_has_next(
+AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+axiom_child_element_iterator_has_next(
axiom_child_element_iterator_t * iterator,
const axutil_env_t * env)
{
@@ -106,11 +106,11 @@
do
{
iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
+ axiom_node_get_next_sibling(iterator->current_child, env);
}
while (iterator->current_child &&
- (axiom_node_get_node_type(iterator->current_child, env)
+ (axiom_node_get_node_type(iterator->current_child, env)
!= AXIOM_ELEMENT));
return iterator->last_child;
Modified: webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_children_iterator.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -35,12 +34,10 @@
axiom_children_iterator_t *iterator = NULL;
AXIS2_ENV_CHECK(env, NULL);
- iterator =
- (axiom_children_iterator_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axiom_children_iterator_t));
+ iterator = (axiom_children_iterator_t *)AXIS2_MALLOC(env->allocator,
+ sizeof(axiom_children_iterator_t));
- if (!iterator)
+ if(!iterator)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -78,23 +75,21 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, iterator, AXIS2_FAILURE);
- if (!(iterator->next_called))
+ if(!(iterator->next_called))
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (iterator->remove_called)
+ if(iterator->remove_called)
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
iterator->remove_called = AXIS2_TRUE;
- if (!(iterator->last_child))
+ if(!(iterator->last_child))
{
return AXIS2_FAILURE;
}
@@ -122,11 +117,10 @@
iterator->next_called = AXIS2_TRUE;
iterator->remove_called = AXIS2_FALSE;
- if (iterator->current_child)
+ if(iterator->current_child)
{
iterator->last_child = iterator->current_child;
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
+ iterator->current_child = axiom_node_get_next_sibling(iterator->current_child, env);
return iterator->last_child;
}
return NULL;
Modified: webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_children_qname_iterator.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -42,11 +41,10 @@
AXIS2_ENV_CHECK(env, NULL);
AXIS2_PARAM_CHECK(env->error, current_child, NULL);
- iterator = (axiom_children_qname_iterator_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axiom_children_qname_iterator_t));
+ iterator = (axiom_children_qname_iterator_t *)AXIS2_MALLOC(env->allocator,
+ sizeof(axiom_children_qname_iterator_t));
- if (!iterator)
+ if(!iterator)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -61,10 +59,10 @@
iterator->given_qname = NULL;
iterator->current_child = current_child;
- if (given_qname)
+ if(given_qname)
{
iterator->given_qname = axutil_qname_clone(given_qname, env);
- if (!(iterator->given_qname))
+ if(!(iterator->given_qname))
{
axiom_children_qname_iterator_free(iterator, env);
return NULL;
@@ -81,7 +79,7 @@
{
AXIS2_ENV_CHECK(env, void);
- if (iterator->given_qname)
+ if(iterator->given_qname)
{
axutil_qname_free(iterator->given_qname, env);
}
@@ -97,23 +95,21 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, iterator, AXIS2_FAILURE);
- if (!(iterator->next_called))
+ if(!(iterator->next_called))
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (iterator->remove_called)
+ if(iterator->remove_called)
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
iterator->remove_called = AXIS2_TRUE;
- if (!(iterator->last_child))
+ if(!(iterator->last_child))
return AXIS2_FAILURE;
axiom_node_free_tree(iterator->last_child, env);
iterator->last_child = NULL;
@@ -125,38 +121,33 @@
axiom_children_qname_iterator_t * iterator,
const axutil_env_t * env)
{
- while (iterator->need_to_move_forward)
+ while(iterator->need_to_move_forward)
{
- if (iterator->current_child)
+ if(iterator->current_child)
{
axiom_element_t *om_element = NULL;
axutil_qname_t *element_qname = NULL;
- if (axiom_node_get_node_type(iterator->current_child, env) ==
- AXIOM_ELEMENT)
+ if(axiom_node_get_node_type(iterator->current_child, env) == AXIOM_ELEMENT)
{
- om_element =
- (axiom_element_t *) axiom_node_get_data_element(iterator->
- current_child,
- env);
+ om_element = (axiom_element_t *)axiom_node_get_data_element(
+ iterator-> current_child, env);
}
-
+
if(om_element)
{
element_qname = axiom_element_get_qname(om_element, env, iterator->current_child);
}
- if (om_element &&
- axutil_qname_equals(element_qname, env, iterator->given_qname))
+ if(om_element && axutil_qname_equals(element_qname, env, iterator->given_qname))
{
iterator->matching_node_found = AXIS2_TRUE;
iterator->need_to_move_forward = AXIS2_FALSE;
}
else
{
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
- if (iterator->current_child)
+ iterator->current_child = axiom_node_get_next_sibling(iterator->current_child, env);
+ if(iterator->current_child)
{
iterator->need_to_move_forward = AXIS2_TRUE;
iterator->matching_node_found = AXIS2_TRUE;
@@ -190,10 +181,9 @@
iterator->remove_called = AXIS2_FALSE;
iterator->last_child = iterator->current_child;
- if (iterator->current_child)
+ if(iterator->current_child)
{
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
+ iterator->current_child = axiom_node_get_next_sibling(iterator->current_child, env);
}
return iterator->last_child;
}
Modified: webservices/axis2/trunk/c/axiom/src/om/om_children_with_specific_attribute_iterator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_children_with_specific_attribute_iterator.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_children_with_specific_attribute_iterator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_children_with_specific_attribute_iterator.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -44,11 +43,10 @@
AXIS2_PARAM_CHECK(env->error, current_child, NULL);
AXIS2_PARAM_CHECK(env->error, attr_qname, NULL);
AXIS2_PARAM_CHECK(env->error, attr_value, NULL);
- iterator = (axiom_children_with_specific_attribute_iterator_t *)
- AXIS2_MALLOC(env->allocator,
- sizeof(axiom_children_with_specific_attribute_iterator_t));
+ iterator = (axiom_children_with_specific_attribute_iterator_t *)AXIS2_MALLOC(env->allocator,
+ sizeof(axiom_children_with_specific_attribute_iterator_t));
- if (!iterator)
+ if(!iterator)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -73,7 +71,7 @@
const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, void);
- if (iterator->attr_qname)
+ if(iterator->attr_qname)
{
axutil_qname_free(iterator->attr_qname, env);
}
@@ -89,23 +87,21 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, iterator, AXIS2_FAILURE);
- if (!(iterator->next_called))
+ if(!(iterator->next_called))
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_NEXT_METHOD_HAS_NOT_YET_BEEN_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
- if (iterator->remove_called)
+ if(iterator->remove_called)
{
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_ITERATOR_REMOVE_HAS_ALREADY_BEING_CALLED,
+ AXIS2_FAILURE);
return AXIS2_FAILURE;
}
iterator->remove_called = AXIS2_TRUE;
- if (!(iterator->last_child))
+ if(!(iterator->last_child))
return AXIS2_FAILURE;
axiom_node_free_tree(iterator->last_child, env);
iterator->last_child = NULL;
@@ -121,44 +117,38 @@
axis2_bool_t need_to_move_forward = AXIS2_TRUE;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (!(iterator->current_child))
+ if(!(iterator->current_child))
{
return AXIS2_FALSE;
}
- while (need_to_move_forward)
+ while(need_to_move_forward)
{
- if (axiom_node_get_node_type(iterator->current_child, env)
- == AXIOM_ELEMENT)
+ if(axiom_node_get_node_type(iterator->current_child, env) == AXIOM_ELEMENT)
{
axiom_attribute_t *om_attr = NULL;
axiom_element_t *om_ele = NULL;
- om_ele =
- (axiom_element_t *) axiom_node_get_data_element(iterator->
- current_child,
- env);
- om_attr =
- axiom_element_get_attribute(om_ele, env, iterator->attr_qname);
+ om_ele = (axiom_element_t *)axiom_node_get_data_element(iterator-> current_child, env);
+ om_attr = axiom_element_get_attribute(om_ele, env, iterator->attr_qname);
break;
/*if (om_attr &&
- (axutil_strcmp(axiom_attribute_get_value(om_attr, env),
- iterator->attr_value) == 0))
- {
- matching_node_found = AXIS2_TRUE;
- need_to_move_forward = AXIS2_FALSE;
- }
- else
- {
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
- need_to_move_forward = (iterator->current_child != NULL);
+ (axutil_strcmp(axiom_attribute_get_value(om_attr, env),
+ iterator->attr_value) == 0))
+ {
+ matching_node_found = AXIS2_TRUE;
+ need_to_move_forward = AXIS2_FALSE;
+ }
+ else
+ {
+ iterator->current_child =
+ axiom_node_get_next_sibling(iterator->current_child, env);
+ need_to_move_forward = (iterator->current_child != NULL);
- }*/
+ }*/
}
else
{
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
+ iterator->current_child = axiom_node_get_next_sibling(iterator->current_child, env);
need_to_move_forward = (iterator->current_child != NULL);
}
@@ -177,10 +167,9 @@
iterator->next_called = AXIS2_TRUE;
iterator->remove_called = AXIS2_FALSE;
iterator->last_child = iterator->current_child;
- iterator->current_child =
- axiom_node_get_next_sibling(iterator->current_child, env);
- if (iterator->last_child && iterator->detach &&
- (axiom_node_get_parent(iterator->last_child, env)))
+ iterator->current_child = axiom_node_get_next_sibling(iterator->current_child, env);
+ if(iterator->last_child && iterator->detach
+ && (axiom_node_get_parent(iterator->last_child, env)))
{
axiom_node_free_tree(iterator->last_child, env);
}
Modified: webservices/axis2/trunk/c/axiom/src/om/om_comment.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_comment.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_comment.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_comment.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -40,15 +39,14 @@
AXIS2_PARAM_CHECK(env->error, node, NULL);
*node = NULL;
*node = axiom_node_create(env);
- if (!*node)
+ if(!*node)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- comment = (axiom_comment_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_comment_t));
- if (!comment)
+ comment = (axiom_comment_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_comment_t));
+ if(!comment)
{
AXIS2_FREE(env->allocator, (*node));
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -57,10 +55,10 @@
comment->value = NULL;
- if (value)
+ if(value)
{
- comment->value = (axis2_char_t *) axutil_strdup(env, value);
- if (!comment->value)
+ comment->value = (axis2_char_t *)axutil_strdup(env, value);
+ if(!comment->value)
{
AXIS2_FREE(env->allocator, comment);
AXIS2_FREE(env->allocator, (*node));
@@ -72,7 +70,7 @@
axiom_node_set_data_element((*node), env, comment);
axiom_node_set_node_type((*node), env, AXIOM_COMMENT);
- if (parent)
+ if(parent)
{
axiom_node_add_child(parent, env, (*node));
}
@@ -87,7 +85,7 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (comment->value)
+ if(comment->value)
{
AXIS2_FREE(env->allocator, comment->value);
}
@@ -112,14 +110,14 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
- if (comment->value)
+ if(comment->value)
{
AXIS2_FREE(env->allocator, comment->value);
}
- comment->value = (axis2_char_t *) axutil_strdup(env, value);
+ comment->value = (axis2_char_t *)axutil_strdup(env, value);
- if (!comment->value)
+ if(!comment->value)
{
return AXIS2_FAILURE;
}
@@ -136,10 +134,9 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
- if (comment->value)
+ if(comment->value)
{
- return axiom_output_write(om_output, env,
- AXIOM_COMMENT, 1, comment->value);
+ return axiom_output_write(om_output, env, AXIOM_COMMENT, 1, comment->value);
}
return AXIS2_FAILURE;
}
Modified: webservices/axis2/trunk/c/axiom/src/om/om_data_source.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_data_source.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_data_source.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_data_source.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -48,15 +47,13 @@
*node = axiom_node_create(env);
- if (!(*node))
+ if(!(*node))
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- data_source = (axiom_data_source_t *) AXIS2_MALLOC(env->allocator,
- sizeof
- (axiom_data_source_t));
- if (!data_source)
+ data_source = (axiom_data_source_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_data_source_t));
+ if(!data_source)
{
AXIS2_FREE(env->allocator, *node);
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -70,7 +67,7 @@
data_source->stream = NULL;
data_source->stream = axutil_stream_create_basic(env);
- if (!(data_source->stream))
+ if(!(data_source->stream))
{
AXIS2_FREE(env->allocator, *node);
AXIS2_FREE(env->allocator, data_source);
@@ -78,7 +75,7 @@
return NULL;
}
- if (parent && axiom_node_get_node_type(parent, env) == AXIOM_ELEMENT)
+ if(parent && axiom_node_get_node_type(parent, env) == AXIOM_ELEMENT)
{
axiom_node_add_child(parent, env, (*node));
}
@@ -93,7 +90,7 @@
{
AXIS2_ENV_CHECK(env, void);
- if (data_source->stream)
+ if(data_source->stream)
{
axutil_stream_free(data_source->stream, env);
}
@@ -118,7 +115,7 @@
data = axutil_stream_get_buffer(data_source->stream, env);
data_len = axutil_stream_get_len(data_source->stream, env);
- if (data)
+ if(data)
{
data[data_len] = '\0';
status = axiom_output_write(om_output, env, AXIOM_DATA_SOURCE, 1, data);
Modified: webservices/axis2/trunk/c/axiom/src/om/om_doctype.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_doctype.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_doctype.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_doctype.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -39,16 +38,15 @@
AXIS2_PARAM_CHECK(env->error, node, NULL);
*node = axiom_node_create(env);
- if (!*node)
+ if(!*node)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
}
- doctype = (axiom_doctype_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_doctype_t));
+ doctype = (axiom_doctype_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_doctype_t));
- if (!doctype)
+ if(!doctype)
{
AXIS2_FREE(env->allocator, (*node));
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -57,10 +55,10 @@
doctype->value = NULL;
- if (value)
+ if(value)
{
- doctype->value = (axis2_char_t *) axutil_strdup(env, value);
- if (!doctype->value)
+ doctype->value = (axis2_char_t *)axutil_strdup(env, value);
+ if(!doctype->value)
{
AXIS2_FREE(env->allocator, doctype);
AXIS2_FREE(env->allocator, (*node));
@@ -72,7 +70,7 @@
axiom_node_set_data_element((*node), env, doctype);
axiom_node_set_node_type((*node), env, AXIOM_DOCTYPE);
- if (parent)
+ if(parent)
{
axiom_node_add_child(parent, env, (*node));
}
@@ -85,9 +83,9 @@
axiom_doctype_t * om_doctype,
const axutil_env_t * env)
{
- if (om_doctype)
+ if(om_doctype)
{
- if (om_doctype->value)
+ if(om_doctype->value)
{
AXIS2_FREE(env->allocator, om_doctype->value);
}
@@ -104,7 +102,7 @@
{
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
- om_doctype->value = (axis2_char_t *) axutil_strdup(env, value);
+ om_doctype->value = (axis2_char_t *)axutil_strdup(env, value);
return AXIS2_SUCCESS;
}
@@ -126,9 +124,8 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, om_output, AXIS2_FAILURE);
- if (om_doctype->value)
- return axiom_output_write(om_output, env,
- AXIOM_DOCTYPE, 1, om_doctype->value);
+ if(om_doctype->value)
+ return axiom_output_write(om_output, env, AXIOM_DOCTYPE, 1, om_doctype->value);
return AXIS2_FAILURE;
}
Modified: webservices/axis2/trunk/c/axiom/src/om/om_document.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_document.c?rev=805360&r1=805359&r2=805360&view=diff
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_document.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_document.c Tue Aug 18 11:08:42 2009
@@ -1,4 +1,3 @@
-
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -55,10 +54,9 @@
AXIS2_ENV_CHECK(env, NULL);
- document = (axiom_document_t *) AXIS2_MALLOC(env->allocator,
- sizeof(axiom_document_t));
+ document = (axiom_document_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_document_t));
- if (!document)
+ if(!document)
{
AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
return NULL;
@@ -82,7 +80,7 @@
{
AXIS2_ENV_CHECK(env, void);
- if (document->root_element)
+ if(document->root_element)
{
axiom_node_free_tree(document->root_element, env);
}
@@ -108,28 +106,27 @@
AXIS2_ENV_CHECK(env, NULL);
- if (!document->builder)
+ if(!document->builder)
{
return NULL;
}
- if (!(document->root_element))
+ if(!(document->root_element))
{
last_child = axiom_stax_builder_next(document->builder, env);
- if (last_child)
+ if(last_child)
{
document->last_child = last_child;
document->root_element = last_child;
}
return last_child;
}
- else if ((document->root_element) &&
- (axiom_node_is_complete(document->root_element, env) ==
- AXIS2_TRUE))
- return NULL; /* Nothing wrong but done with pulling */
+ else if((document->root_element) && (axiom_node_is_complete(document->root_element, env)
+ == AXIS2_TRUE))
+ return NULL; /* Nothing wrong but done with pulling */
last_child = axiom_stax_builder_next(document->builder, env);
- if (last_child)
+ if(last_child)
{
document->last_child = last_child;
}
@@ -144,19 +141,17 @@
axiom_node_t *node = NULL;
AXIS2_ENV_CHECK(env, NULL);
- if (document->root_element)
+ if(document->root_element)
{
return document->root_element;
}
node = axiom_document_build_next(document, env);
- if (document->root_element)
+ if(document->root_element)
{
return document->root_element;
}
- AXIS2_ERROR_SET(env->error,
- AXIS2_ERROR_INVALID_DOCUMENT_STATE_ROOT_NULL,
- AXIS2_FAILURE);
+ AXIS2_ERROR_SET(env->error, AXIS2_ERROR_INVALID_DOCUMENT_STATE_ROOT_NULL, AXIS2_FAILURE);
return NULL;
}
@@ -169,7 +164,7 @@
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
AXIS2_PARAM_CHECK(env->error, node, AXIS2_FAILURE);
- if (document->root_element)
+ if(document->root_element)
{
axiom_node_free_tree(document->root_element, env);
document->root_element = node;
@@ -188,24 +183,23 @@
const axutil_env_t * env)
{
AXIS2_ENV_CHECK(env, NULL);
- if (!document)
+ if(!document)
{
return NULL;
}
- if (!document->root_element)
+ if(!document->root_element)
{
axiom_document_get_root_element(document, env);
}
- if (document->root_element)
+ if(document->root_element)
{
do
{
axiom_node_t *ret_val = NULL;
ret_val = axiom_document_build_next(document, env);
- if (!ret_val)
+ if(!ret_val)
{
- if (axiom_node_is_complete(document->root_element, env) ==
- AXIS2_TRUE)
+ if(axiom_node_is_complete(document->root_element, env) == AXIS2_TRUE)
{
/** document is completly build */
@@ -219,7 +213,7 @@
}
}
}
- while (!axiom_node_is_complete(document->root_element, env));
+ while(!axiom_node_is_complete(document->root_element, env));
return document->root_element;
}
else
@@ -250,15 +244,15 @@
const axutil_env_t * env,
axiom_output_t * om_output)
{
- if (!document)
+ if(!document)
return AXIS2_FAILURE;
AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
- if (!(document->root_element))
+ if(!(document->root_element))
{
axiom_document_get_root_element(document, env);
}
- if (document->root_element)
+ if(document->root_element)
{
return axiom_node_serialize(document->root_element, env, om_output);
}