axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r291870 - in /webservices/axis2/trunk/c: include/axis2c_node.h modules/xml/om/src/axis2c_node.c
Date Tue, 27 Sep 2005 09:21:10 GMT
Author: samisa
Date: Tue Sep 27 02:21:04 2005
New Revision: 291870

URL: http://svn.apache.org/viewcvs?rev=291870&view=rev
Log:
Fixed compilation problems

Modified:
    webservices/axis2/trunk/c/include/axis2c_node.h
    webservices/axis2/trunk/c/modules/xml/om/src/axis2c_node.c

Modified: webservices/axis2/trunk/c/include/axis2c_node.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/include/axis2c_node.h?rev=291870&r1=291869&r2=291870&view=diff
==============================================================================
--- webservices/axis2/trunk/c/include/axis2c_node.h (original)
+++ webservices/axis2/trunk/c/include/axis2c_node.h Tue Sep 27 02:21:04 2005
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef _AXISC_NODE_H_
-#define _AXISC_NODE_H_
+#ifndef AXIS2C_NODE_H
+#define AXIS2C_NODE_H
 
 #include <apr.h>
 #include <apr_pools.h>
@@ -40,9 +40,6 @@
 	OM_TEXT=80
 };
 
-struct node_s;
-typedef struct node_s node_t;
-
 /*
 * This is the structure that defines a node in om tree 
 * parent   - parent node if one is available
@@ -50,43 +47,41 @@
 * element_type - the type of the element one of omtypes
 * data_element  - stores the structs created for storing xml 
 */
-
-
-struct node_s{
-	struct node_s *parent;
-	struct node_s *prev_sibling;
-	struct node_s *next_sibling;
-	struct node_s *first_child;
-	struct node_s *last_child;
+typedef struct axis2c_node_t{
+	struct axis2c_node_t *parent;
+	struct axis2c_node_t *prev_sibling;
+	struct axis2c_node_t *next_sibling;
+	struct axis2c_node_t *first_child;
+	struct axis2c_node_t *last_child;
 	XML_PullParser *parser;
 	int element_type;
 	int done;
 	void* data_element;
-};
+}axis2c_node_t;
 
 
 //create a node and allocate memory
-node_t *create_node();
+axis2c_node_t *axis2c_create_node();
 //free a given nod
-void free_node(node_t *);
+void axis2c_free_node(axis2c_node_t *);
 // add a node as a child of parent node
-void node_add_child(node_t *parent,node_t *child);
+void axis2c_node_add_child(axis2c_node_t *parent,axis2c_node_t *child);
 // detach a node form the parent and reset the other links
-node_t *node_detach(node_t *node_to_detach);
+axis2c_node_t *axis2c_node_detach(axis2c_node_t *node_to_detach);
 // insert a sibling node 
-void node_insert_sibling_after(node_t *current_ele,node_t *nodeto_insert);
-void node_insert_sibling_before(node_t *current_ele,node_t *nodeto_insert);
+void axis2c_node_insert_sibling_after(axis2c_node_t *current_ele,axis2c_node_t *nodeto_insert);
+void axis2c_node_insert_sibling_before(axis2c_node_t *current_ele,axis2c_node_t *nodeto_insert);
 
 // build the tree 
-int node_build(node_t *node);
+int axis2c_node_build(axis2c_node_t *node);
 
 
 
-void node_set_parent(node_t *parent);
+void axis2c_node_set_parent(axis2c_node_t *parent);
 
-node_t *node_get_next_sibling(node_t *node);
+axis2c_node_t *axis2c_node_get_next_sibling(axis2c_node_t *node);
 
-node_t *node_set_next_sibling(node_t *node);
+axis2c_node_t *axis2c_node_set_next_sibling(axis2c_node_t *node);
 
 
 
@@ -97,4 +92,4 @@
 
 
 
-#endif // _AXISC_NODE_
+#endif // AXIS2C_NODE

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2c_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2c_node.c?rev=291870&r1=291869&r2=291870&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2c_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2c_node.c Tue Sep 27 02:21:04 2005
@@ -16,9 +16,9 @@
 
 #include <axis2c_node.h>
 
-node_t *axis2c_create_node()
+axis2c_node_t *axis2c_create_node()
 {
-    node_t *node = (node_t *) malloc(sizeof(node_t));
+    axis2c_node_t *node = (axis2c_node_t *) malloc(sizeof(axis2c_node_t));
     if (!node)
     {
 	return NULL;
@@ -36,14 +36,14 @@
 }
 
 
-void axis2c_free_node(node_t * node)
+void axis2c_free_node(axis2c_node_t * node)
 {
     if (!node)
 	return;
     //if(node->
 }
 
-void axis2c_node_add_child(node_t * parent, node_t * child)
+void axis2c_node_add_child(axis2c_node_t * parent, axis2c_node_t * child)
 {
     if (!parent || !child)
 	return;
@@ -62,44 +62,45 @@
 
 
 
-node_t *axis2c_detach_node(node_t * node_to_detach)
+axis2c_node_t *axis2c_detach_node(axis2c_node_t * axis2c_node_to_detach)
 {
-    node_t *parent = NULL;
-    node_t *next_sibling = NULL;
-    if (!node_to_detach)
+    axis2c_node_t *parent = NULL;
+    axis2c_node_t *next_sibling = NULL;
+    if (!axis2c_node_to_detach)
     {
 	return NULL;
     }
 
-    if (!(node_to_detach->parent))
+    if (!(axis2c_node_to_detach->parent))
     {
 	/* nodes that do not have a parent can't be detached
 	 */
 	return NULL;
     }
-    parent = node_to_detach->parent;
-    if ((node_to_detach->prev_sibling) == NULL)
+    parent = axis2c_node_to_detach->parent;
+    if ((axis2c_node_to_detach->prev_sibling) == NULL)
     {
-	parent->first_child = node_to_detach->next_sibling;
+	parent->first_child = axis2c_node_to_detach->next_sibling;
     }
     else
     {
-	node_to_detach->prev_sibling->next_sibling =
-	    node_to_detach->next_sibling;
+	axis2c_node_to_detach->prev_sibling->next_sibling =
+	    axis2c_node_to_detach->next_sibling;
     }
-    if (!(node_to_detach->next_sibling))
+    if (!(axis2c_node_to_detach->next_sibling))
     {
-	node_to_detach->next_sibling->prev_sibling =
-	    node_to_detach->prev_sibling;
+	axis2c_node_to_detach->next_sibling->prev_sibling =
+	    axis2c_node_to_detach->prev_sibling;
     }
 
-    node_to_detach->parent = NULL;
+    axis2c_node_to_detach->parent = NULL;
 
-    return node_to_detach;
+    return axis2c_node_to_detach;
 
 }
 
-void axis2c_node_set_parent(node_t * node)
+void axis2c_node_set_parent(axis2c_node_t * node)
 {
 
 }
+



Mime
View raw message