axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dushshan...@apache.org
Subject svn commit: r518541 - in /webservices/axis2/trunk/c/axiom: include/axiom_navigator.h src/om/om_navigator.c
Date Thu, 15 Mar 2007 09:31:08 GMT
Author: dushshantha
Date: Thu Mar 15 02:31:07 2007
New Revision: 518541

URL: http://svn.apache.org/viewvc?view=rev&rev=518541
Log:
removed macros and corrected indentation.

Modified:
    webservices/axis2/trunk/c/axiom/include/axiom_navigator.h
    webservices/axis2/trunk/c/axiom/src/om/om_navigator.c

Modified: webservices/axis2/trunk/c/axiom/include/axiom_navigator.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/include/axiom_navigator.h?view=diff&rev=518541&r1=518540&r2=518541
==============================================================================
--- webservices/axis2/trunk/c/axiom/include/axiom_navigator.h (original)
+++ webservices/axis2/trunk/c/axiom/include/axiom_navigator.h Thu Mar 15 02:31:07 2007
@@ -18,11 +18,6 @@
 #ifndef AXIOM_NAVIGATOR_H
 #define AXIOM_NAVIGATOR_H
 
-/**
- * @file axiom_navigator.h
- * @brief defines axiom_navigator struct and its ops
- */
-
 #include <axis2_utils.h>
 #include <axis2_env.h>
 #include <axiom_node.h>
@@ -40,17 +35,16 @@
 
     typedef struct axiom_navigator axiom_navigator_t;
 
-    /** create an axiom_navigator
+    /** Creates an axiom_navigator
      * @param env environment MUST not be NULL
      * @param node a pointer to axiom_node_t struct 
      * which is to be navigated
      * @returns a pointer to axiom_navigator_t struct
      * or returns NULL on error
      */
-
-    AXIS2_EXTERN axiom_navigator_t * AXIS2_CALL
+    AXIS2_EXTERN axiom_navigator_t *AXIS2_CALL
     axiom_navigator_create(const axis2_env_t *env,
-            axiom_node_t *node);
+        axiom_node_t *node);
 
     /**
      * free function , free the axiom_navigator struct
@@ -58,25 +52,23 @@
      * @param env environment MUST not be NULL
      * @returns AXIS2_SUCCESS 
      */
-
     AXIS2_EXTERN axis2_status_t AXIS2_CALL
     axiom_navigator_free(axiom_navigator_t *om_navigator,
-            const axis2_env_t *env);
+        const axis2_env_t *env);
 
     /**
-     *  returns the navigable status 
+     * Returns the navigable status 
      * @param  om_navigator axiom_navigator_struct
      * @param env environment MUST not be NULL
      * @returns AXIS2_TRUE if the om is navigable 
      * otherwise returns AXIS2_FALSE
      */
-
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
     axiom_navigator_is_navigable(axiom_navigator_t *om_navigator,
-            const axis2_env_t *env);
+        const axis2_env_t *env);
 
     /**
-     * returns the build status of this node 
+     * Returns the build status of this node 
      * if the node is completly build returns AXIS2_TRUE
      * otherwise AXIS2_FALSE
      * @param om_navigator axiom_navigator struct
@@ -84,10 +76,9 @@
      * @return AXIS2_TRUE if this node is completly built
      * otherwise return AXIS2_FALSE
      */
-
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
     axiom_navigator_is_completed(axiom_navigator_t *om_navigator,
-            const axis2_env_t *env);
+        const axis2_env_t *env);
 
     /**
      * gets the next node 
@@ -101,7 +92,7 @@
 
     AXIS2_EXTERN axiom_node_t* AXIS2_CALL
     axiom_navigator_next(axiom_navigator_t *om_navigator,
-            const axis2_env_t *env);
+        const axis2_env_t *env);
 
     /**
      * method visited 
@@ -112,25 +103,24 @@
      */
     AXIS2_EXTERN axis2_bool_t AXIS2_CALL
     axiom_navigator_visited(axiom_navigator_t *om_navigator,
-            const axis2_env_t *env);
-
+        const axis2_env_t *env);
 
     /** Macros ********************************************************************/
 
-#define AXIOM_NAVIGATOR_FREE(navigator, env) \
-        axiom_navigator_free(navigator, env)
+/*#define AXIOM_NAVIGATOR_FREE(navigator, env) \
+        axiom_navigator_free(navigator, env)*/
 
-#define AXIOM_NAVIGATOR_IS_NAVIGABLE(navigator, env) \
-        axiom_navigator_is_navigable(navigator, env)
+/*#define AXIOM_NAVIGATOR_IS_NAVIGABLE(navigator, env) \
+        axiom_navigator_is_navigable(navigator, env)*/
 
-#define AXIOM_NAVIGATOR_IS_COMPLETED(navigator, env) \
-        axiom_navigator_is_completed(navigator, env)
+/*#define AXIOM_NAVIGATOR_IS_COMPLETED(navigator, env) \
+        axiom_navigator_is_completed(navigator, env)*/
 
-#define AXIOM_NAVIGATOR_VISITED(navigator, env) \
-        axiom_navigator_visited(navigator, env)
+/*#define AXIOM_NAVIGATOR_VISITED(navigator, env) \
+        axiom_navigator_visited(navigator, env)*/
 
-#define AXIOM_NAVIGATOR_NEXT(navigator, env) \
-        axiom_navigator_next(navigator, env)
+/*#define AXIOM_NAVIGATOR_NEXT(navigator, env) \
+        axiom_navigator_next(navigator, env)*/
 
     /** @} */
 

Modified: webservices/axis2/trunk/c/axiom/src/om/om_navigator.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_navigator.c?view=diff&rev=518541&r1=518540&r2=518541
==============================================================================
--- webservices/axis2/trunk/c/axiom/src/om/om_navigator.c (original)
+++ webservices/axis2/trunk/c/axiom/src/om/om_navigator.c Thu Mar 15 02:31:07 2007
@@ -19,7 +19,7 @@
 
 static void
 axiom_navigator_update_next_node(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env);
+    const axis2_env_t *env);
 
 struct axiom_navigator
 {
@@ -39,16 +39,16 @@
 
 };
 
-AXIS2_EXTERN axiom_navigator_t * AXIS2_CALL
+AXIS2_EXTERN axiom_navigator_t *AXIS2_CALL
 axiom_navigator_create(const axis2_env_t *env,
-        axiom_node_t *om_node)
+    axiom_node_t *om_node)
 {
     axiom_navigator_t *om_navigator = NULL;
     AXIS2_ENV_CHECK(env, NULL);
     AXIS2_PARAM_CHECK(env->error, om_node, NULL);
 
-    om_navigator = (axiom_navigator_t *)
-            AXIS2_MALLOC(env->allocator, sizeof(axiom_navigator_t));
+    om_navigator =
+        (axiom_navigator_t *)AXIS2_MALLOC(env->allocator, sizeof(axiom_navigator_t));
     if (!om_navigator)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
@@ -72,58 +72,56 @@
 
 AXIS2_EXTERN axis2_status_t AXIS2_CALL
 axiom_navigator_free(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env , AXIS2_FAILURE);
-
     AXIS2_FREE(env->allocator, om_navigator);
-    om_navigator = NULL;
     return AXIS2_SUCCESS;
 }
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axiom_navigator_is_navigable(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
-
     if (AXIS2_TRUE == om_navigator->end)
+    {
         return AXIS2_FALSE;
+    }
     else
     {
         if (om_navigator->next)
+        {
             return AXIS2_TRUE;
+        }
     }
     return AXIS2_FALSE;
 }
 
-
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axiom_navigator_is_completed(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     return om_navigator->end;
 }
 
 
 AXIS2_EXTERN axis2_bool_t AXIS2_CALL
 axiom_navigator_visited(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
-    AXIS2_ENV_CHECK(env, AXIS2_FALSE);
     return om_navigator->visited;
 }
 
-
-AXIS2_EXTERN axiom_node_t* AXIS2_CALL
+AXIS2_EXTERN axiom_node_t *AXIS2_CALL
 axiom_navigator_next(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, NULL);
 
     if (NULL == om_navigator->next)
+    {
         return NULL;
+    }
 
     om_navigator->node = om_navigator->next;
     om_navigator->visited = om_navigator->backtracked;
@@ -131,7 +129,6 @@
 
     axiom_navigator_update_next_node(om_navigator, env);
 
-
     /** set the starting and ending flags */
     if (om_navigator->root == om_navigator->next)
     {
@@ -147,24 +144,27 @@
     return om_navigator->node;
 }
 
-
 /** this method encapsulate searching logic */
 static void
 axiom_navigator_update_next_node(axiom_navigator_t *om_navigator,
-        const axis2_env_t *env)
+    const axis2_env_t *env)
 {
     if (!om_navigator)
+    {
         return;
+    }
 
     if (!om_navigator->next)
+    {
         return;
+    }
 
     if ((AXIOM_ELEMENT == AXIOM_NODE_GET_NODE_TYPE(om_navigator->next, env)) &&
-            !(om_navigator->visited))
+        !(om_navigator->visited))
     {
         if (AXIOM_NODE_GET_FIRST_CHILD(om_navigator->next, env))
         {
-            om_navigator->next =    AXIOM_NODE_GET_FIRST_CHILD(om_navigator->next,
env);
+            om_navigator->next = AXIOM_NODE_GET_FIRST_CHILD(om_navigator->next, env);
         }
         else if (AXIS2_TRUE == AXIOM_NODE_IS_COMPLETE(om_navigator->next, env))
         {
@@ -199,3 +199,4 @@
         }
     }
 }
+



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message