axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r494302 [1/2] - in /webservices/axis2/trunk/c/util: include/ src/
Date Tue, 09 Jan 2007 02:20:10 GMT
Author: samisa
Date: Mon Jan  8 18:20:08 2007
New Revision: 494302

URL: http://svn.apache.org/viewvc?view=rev&rev=494302
Log:
More formatting fixing and dropping of ops struct

Modified:
    webservices/axis2/trunk/c/util/include/axis2_stack.h
    webservices/axis2/trunk/c/util/include/axis2_stream.h
    webservices/axis2/trunk/c/util/include/axis2_string.h
    webservices/axis2/trunk/c/util/include/axis2_string_util.h
    webservices/axis2/trunk/c/util/include/axis2_thread.h
    webservices/axis2/trunk/c/util/include/axis2_thread_pool.h
    webservices/axis2/trunk/c/util/include/axis2_types.h
    webservices/axis2/trunk/c/util/include/axis2_uri.h
    webservices/axis2/trunk/c/util/include/axis2_url.h
    webservices/axis2/trunk/c/util/include/axis2_utils.h
    webservices/axis2/trunk/c/util/include/axis2_uuid_gen.h
    webservices/axis2/trunk/c/util/src/stack.c
    webservices/axis2/trunk/c/util/src/types.c
    webservices/axis2/trunk/c/util/src/uri.c
    webservices/axis2/trunk/c/util/src/url.c
    webservices/axis2/trunk/c/util/src/uuid_gen.c

Modified: webservices/axis2/trunk/c/util/include/axis2_stack.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_stack.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_stack.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_stack.h Mon Jan  8 18:20:08 2007
@@ -14,15 +14,15 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
- 
- #ifndef AXIS2_STACK_H
- #define AXIS2_STACK_H
- 
- 
- /**
- * @file axis2_stack.h
- * @brief represents a stack
- */
+
+#ifndef AXIS2_STACK_H
+#define AXIS2_STACK_H
+
+
+/**
+* @file axis2_stack.h
+* @brief represents a stack
+*/
 
 #include <axis2_utils_defines.h>
 #include <axis2_env.h>
@@ -32,92 +32,70 @@
 {
 #endif
 
-typedef struct axis2_stack_ops axis2_stack_ops_t;
-typedef struct axis2_stack axis2_stack_t;
+    /**
+     * @defgroup axis2_util_stack stack
+     * @ingroup axis2_util
+     * @{
+     */
 
-/**
- * @defgroup axis2_util_stack stack
- * @ingroup axis2_util
- * @{
- */
+    typedef struct axis2_stack axis2_stack_t;
 
-/**
- * \brief Axis2 stack ops struct
- * Encapsulator struct for ops of axis2_qname
- */
+    AXIS2_EXTERN axis2_stack_t * AXIS2_CALL
+    axis2_stack_create(const axis2_env_t *env);
 
- struct axis2_stack_ops
-{
     /**
      * Free function of the stack
      * @param stack pointer to stack
      * @param env environemnt
      */
-     
-    axis2_status_t (AXIS2_CALL*
-    free)(axis2_stack_t *stack,
-          const axis2_env_t *env);      
-       
-    void* (AXIS2_CALL*
-    pop)(axis2_stack_t *stack,
-         const axis2_env_t *env); 
-    
-    axis2_status_t (AXIS2_CALL *
-    push)(axis2_stack_t *stack,
-          const axis2_env_t *env,
-          void* value);
-          
-    int (AXIS2_CALL *
-    size)(axis2_stack_t *stack,
-          const axis2_env_t *env);
-    /** 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_stack_free(axis2_stack_t *stack,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN void* AXIS2_CALL
+    axis2_stack_pop(axis2_stack_t *stack,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_stack_push(axis2_stack_t *stack,
+        const axis2_env_t *env,
+        void* value);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axis2_stack_size(axis2_stack_t *stack,
+        const axis2_env_t *env);
+    /**
      * returns the last put value from the stack
      * without removing it from stack
-     */      
-          
-    void* (AXIS2_CALL *
-    get)(axis2_stack_t *stack,
-         const axis2_env_t *env);  
-         
-    void* (AXIS2_CALL *
-    get_at)(axis2_stack_t *stack,
-            const axis2_env_t *env,
-            int i);
-                                       
-          
-};
- 
-struct axis2_stack
-{
-    axis2_stack_ops_t *ops;
-};
+     */
+    AXIS2_EXTERN void* AXIS2_CALL
+    axis2_stack_get(axis2_stack_t *stack,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN void* AXIS2_CALL
+    axis2_stack_get_at(axis2_stack_t *stack,
+        const axis2_env_t *env,
+        int i);
 
-AXIS2_EXTERN axis2_stack_t * AXIS2_CALL
-axis2_stack_create(const axis2_env_t *env);
- 
- 
-/*************MACROS ********************************************************/
- 
 #define AXIS2_STACK_FREE( stack, env) \
-        ((stack)->ops->free( stack, env))
-        
+        axis2_stack_free( stack, env)
+
 #define AXIS2_STACK_POP( stack, env) \
-        ((stack)->ops->pop( stack, env))
-        
+        axis2_stack_pop( stack, env)
+
 #define AXIS2_STACK_PUSH( stack, env, value) \
-        ((stack)->ops->push( stack, env, value))
-        
+        axis2_stack_push( stack, env, value)
+
 #define AXIS2_STACK_SIZE( stack, env) \
-        ((stack)->ops->size( stack, env)) 
-        
+        axis2_stack_size( stack, env)
+
 #define AXIS2_STACK_GET( stack, env) \
-        ((stack)->ops->get( stack, env))
-        
+        axis2_stack_get( stack, env)
+
 #define AXIS2_STACK_GET_AT( stack, env, i) \
-        ((stack)->ops->get_at( stack, env, i))        
- 
-/*************END MACROS ****************************************************/
- /** @} */
+        axis2_stack_get_at( stack, env, i)
+
+    /** @} */
 
 #ifdef __cplusplus
 }

Modified: webservices/axis2/trunk/c/util/include/axis2_stream.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_stream.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_stream.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_stream.h Mon Jan  8 18:20:08 2007
@@ -27,147 +27,147 @@
 {
 #endif
 
-typedef struct axis2_stream axis2_stream_t;
-typedef struct axis2_stream_ops axis2_stream_ops_t;
+    typedef struct axis2_stream axis2_stream_t;
+    typedef struct axis2_stream_ops axis2_stream_ops_t;
 
 #define AXIS2_STREAM_DEFAULT_BUF_SIZE 2048
-/**
- * @defgroup axis2_stream stream
- * @ingroup axis2_util 
- * @{
- */
-
-/**
-* \brief Axis2 stream types
-*
-* This is used to create a stream to correspond to 
-* particular i/o mtd
-*/
-enum axis2_stream_type 
-{
-   AXIS2_STREAM_BASIC = 0,
-   AXIS2_STREAM_FILE,
-   AXIS2_STREAM_SOCKET,
-    AXIS2_STREAM_MANAGED /* Example Wrapper stream for Apache2 read mechanism */
-};
-
-typedef enum axis2_stream_type axis2_stream_type_t;
-
-/** 
-* \brief Axis2 stream ops struct
-*
-* Encapsulator struct for ops of axis2_stream
-*/
- struct axis2_stream_ops
-{
-
-     /**
-       * Deletes the stream
-    * @return axis2_status_t AXIS2_SUCCESS on success else AXIS2_FAILURE
+    /**
+     * @defgroup axis2_stream stream
+     * @ingroup axis2_util
+     * @{
+     */
+
+    /**
+    * \brief Axis2 stream types
+    *
+    * This is used to create a stream to correspond to
+    * particular i/o mtd
     */
-      axis2_status_t (AXIS2_CALL *
-    free_fn)(axis2_stream_t *stream, 
-        const axis2_env_t *env);
-      
-    axis2_status_t (AXIS2_CALL *
-    free_void_arg) (void *stream, 
-                  const axis2_env_t *env);
-   
-     /**
-    * reads from stream
-    * @param buffer buffer into which the content is to be read
-    * @param count size of the buffer
-    * @return no: of bytes read
+    enum axis2_stream_type
+    {
+        AXIS2_STREAM_BASIC = 0,
+        AXIS2_STREAM_FILE,
+        AXIS2_STREAM_SOCKET,
+        AXIS2_STREAM_MANAGED /* Example Wrapper stream for Apache2 read mechanism */
+    };
+
+    typedef enum axis2_stream_type axis2_stream_type_t;
+
+    /**
+    * \brief Axis2 stream ops struct
+    *
+    * Encapsulator struct for ops of axis2_stream
     */
-   
-   int (AXIS2_CALL *
-   read) (axis2_stream_t *stream, 
-         const axis2_env_t *env, 
-         void *buffer, 
-         size_t count);
-   /**
-    * writes into stream
-    * @param buffer buffer to be written
-    * @param count size of the buffer
-    * @return no: of bytes actually written
-    */
-   int (AXIS2_CALL *
-   write) (axis2_stream_t *stream, 
-         const axis2_env_t *env, 
-         const void *buffer, 
-         size_t count);
-      /**
-    * Skips over and discards n bytes of data from this input stream.
-    * @param count number of bytes to be discarded
-    * @return no: of bytes actually skipped
-    */
-   int (AXIS2_CALL *
-   skip) (axis2_stream_t *stream, 
-         const axis2_env_t *env, 
-         int count);
-                  
-   /**
-    * Returns the length of the stream (applicable only to basic stream)
-    * @return Length of the buffer if its type is basic, else -1
-    * (we can't define a length of a stream unless it is just a buffer)
+    struct axis2_stream_ops
+    {
+
+        /**
+          * Deletes the stream
+        * @return axis2_status_t AXIS2_SUCCESS on success else AXIS2_FAILURE
+        */
+        axis2_status_t(AXIS2_CALL *
+                free_fn)(axis2_stream_t *stream,
+                        const axis2_env_t *env);
+
+        axis2_status_t(AXIS2_CALL *
+                free_void_arg)(void *stream,
+                        const axis2_env_t *env);
+
+        /**
+        * reads from stream
+        * @param buffer buffer into which the content is to be read
+        * @param count size of the buffer
+        * @return no: of bytes read
+        */
+
+        int(AXIS2_CALL *
+                read)(axis2_stream_t *stream,
+                        const axis2_env_t *env,
+                        void *buffer,
+                        size_t count);
+        /**
+         * writes into stream
+         * @param buffer buffer to be written
+         * @param count size of the buffer
+         * @return no: of bytes actually written
+         */
+        int(AXIS2_CALL *
+                write)(axis2_stream_t *stream,
+                        const axis2_env_t *env,
+                        const void *buffer,
+                        size_t count);
+        /**
+        * Skips over and discards n bytes of data from this input stream.
+        * @param count number of bytes to be discarded
+        * @return no: of bytes actually skipped
+        */
+        int(AXIS2_CALL *
+                skip)(axis2_stream_t *stream,
+                        const axis2_env_t *env,
+                        int count);
+
+        /**
+         * Returns the length of the stream (applicable only to basic stream)
+         * @return Length of the buffer if its type is basic, else -1
+         * (we can't define a length of a stream unless it is just a buffer)
+         */
+        int(AXIS2_CALL *
+                get_len)(axis2_stream_t *stream,
+                        const axis2_env_t *env);
+    };
+
+    /**
+    * \brief Axis2 Stream struct
+    *
+    * Stream is the encapsulating struct for all stream related ops
     */
-   int (AXIS2_CALL *
-   get_len) (axis2_stream_t *stream, 
-             const axis2_env_t *env);
-};
-
-/** 
-* \brief Axis2 Stream struct
-*
-* Stream is the encapsulating struct for all stream related ops
-*/
- struct axis2_stream
-{
-   /** Stream related ops */
-   axis2_stream_ops_t *ops;
-    /** Stream End of File */
-    int axis2_eof;
-};
-
-/** \brief Constructor for creating an in memory stream
-  * @return axis2_stream (in memory)
-  */
-AXIS2_EXTERN axis2_stream_t * AXIS2_CALL 
-axis2_stream_create_basic (const axis2_env_t *env);
-
-/** \brief Constructor for creating a file stream
-  * @param valid file pointer (opened file)
-  * @return axis2_stream (file)
-  */
-AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
-axis2_stream_create_file (const axis2_env_t *env, FILE *fp);
-
-/** \brief Constructor for creating a file stream
-  * @param valid socket (opened socket)
-  * @return axis2_stream (socket)
-  */
-AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
-axis2_stream_create_socket (const axis2_env_t *env, int socket);
-
-/**
- * Free stream passed as void pointer. This will be
- * cast into appropriate type and then pass the cast object
- * into the module_desc structure's free method
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_stream_free_void_arg (void *stream,
-                            const axis2_env_t *env);
-
-/**
- * Gets the buffer
- */
-AXIS2_EXTERN axis2_char_t * AXIS2_CALL
-axis2_stream_get_buffer (const axis2_stream_t *stream, 
-                         const axis2_env_t *env);
-
-AXIS2_EXTERN int AXIS2_CALL
-axis2_stream_peek_socket(axis2_stream_t *stream, const axis2_env_t *env,
-        void *buffer, size_t count);
+    struct axis2_stream
+    {
+        /** Stream related ops */
+        axis2_stream_ops_t *ops;
+        /** Stream End of File */
+        int axis2_eof;
+    };
+
+    /** \brief Constructor for creating an in memory stream
+      * @return axis2_stream (in memory)
+      */
+    AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
+    axis2_stream_create_basic(const axis2_env_t *env);
+
+    /** \brief Constructor for creating a file stream
+      * @param valid file pointer (opened file)
+      * @return axis2_stream (file)
+      */
+    AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
+    axis2_stream_create_file(const axis2_env_t *env, FILE *fp);
+
+    /** \brief Constructor for creating a file stream
+      * @param valid socket (opened socket)
+      * @return axis2_stream (socket)
+      */
+    AXIS2_EXTERN axis2_stream_t * AXIS2_CALL
+    axis2_stream_create_socket(const axis2_env_t *env, int socket);
+
+    /**
+     * Free stream passed as void pointer. This will be
+     * cast into appropriate type and then pass the cast object
+     * into the module_desc structure's free method
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_stream_free_void_arg(void *stream,
+            const axis2_env_t *env);
+
+    /**
+     * Gets the buffer
+     */
+    AXIS2_EXTERN axis2_char_t * AXIS2_CALL
+    axis2_stream_get_buffer(const axis2_stream_t *stream,
+            const axis2_env_t *env);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axis2_stream_peek_socket(axis2_stream_t *stream, const axis2_env_t *env,
+            void *buffer, size_t count);
 
 #define AXIS2_STREAM_FREE(stream, env) ((stream->ops)->free_fn(stream, env))
 
@@ -176,18 +176,18 @@
 
 #define AXIS2_STREAM_READ(stream, env, buffer, count) \
       ((stream)->ops->read(stream, env, buffer, count))
-      
+
 #define AXIS2_STREAM_WRITE(stream, env, buffer, count) \
       ((stream)->ops->write(stream, env, buffer, count))
-      
+
 #define AXIS2_STREAM_SKIP(stream, env, count) \
       ((stream)->ops->write(stream, env, count))
-      
+
 #define AXIS2_STREAM_BASIC_GET_LEN(stream, env) \
       ((stream)->ops->get_len(stream, env))
-      
-/** @} */
-    
+
+    /** @} */
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/include/axis2_string.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_string.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_string.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_string.h Mon Jan  8 18:20:08 2007
@@ -28,15 +28,15 @@
 {
 #endif
 
-/**
- * @defgroup axis2_string string
- * @ingroup axis2_util 
- * @{
- */
+    /**
+     * @defgroup axis2_string string
+     * @ingroup axis2_util
+     * @{
+     */
 
     AXIS2_EXTERN void* AXIS2_CALL
-    axis2_strdup (const void *ptr, 
-                  const axis2_env_t *env);
+    axis2_strdup(const void *ptr,
+        const axis2_env_t *env);
 
     /**
      * duplicate the first n characters of a string into memory allocated 
@@ -46,10 +46,9 @@
      * @return The new string
      */
     AXIS2_EXTERN void* AXIS2_CALL
-    axis2_strndup (
-            const void *ptr, 
-            int n, 
-            const axis2_env_t *env );
+    axis2_strndup(const void *ptr,
+        int n,
+        const axis2_env_t *env);
 
     /**
      * Create a null-terminated string by making a copy of a sequence
@@ -63,45 +62,45 @@
      *         fewer characters, use axis2_strndup.
      */
     AXIS2_EXTERN void * AXIS2_CALL
-    axis2_strmemdup(const void *ptr, 
-            size_t n, 
-            const axis2_env_t *env);
+    axis2_strmemdup(const void *ptr,
+        size_t n,
+        const axis2_env_t *env);
 
     AXIS2_EXTERN void * AXIS2_CALL
-    axis2_memchr (
-            const void *ptr, 
-            int c, 
-            size_t n);
+    axis2_memchr(const void *ptr,
+        int c,
+        size_t n);
 
     AXIS2_EXTERN int AXIS2_CALL
-    axis2_strcmp (const axis2_char_t * s1, 
-                  const axis2_char_t * s2);
+    axis2_strcmp(const axis2_char_t * s1,
+        const axis2_char_t * s2);
 
     AXIS2_EXTERN int AXIS2_CALL
-    axis2_strncmp (const axis2_char_t * s1, 
-                  const axis2_char_t * s2,
-                  int n);
+    axis2_strncmp(const axis2_char_t * s1,
+        const axis2_char_t * s2,
+        int n);
 
     AXIS2_EXTERN axis2_ssize_t AXIS2_CALL
     axis2_strlen(const axis2_char_t * s);
 
     AXIS2_EXTERN int AXIS2_CALL
-    axis2_strcasecmp(const axis2_char_t *s1, 
-                     const axis2_char_t *s2);
+    axis2_strcasecmp(const axis2_char_t *s1,
+        const axis2_char_t *s2);
 
     AXIS2_EXTERN int AXIS2_CALL
-    axis2_strncasecmp(const axis2_char_t *s1, 
-                      const axis2_char_t *s2, int n);
-    
+    axis2_strncasecmp(const axis2_char_t *s1,
+        const axis2_char_t *s2, 
+        int n);
+
     /* much similar to the strcat behaviour. But the difference is
      * this allocates new memory to put the conatenated string rather than
      * modifying the first argument. The user should free the allocated
      * memory for the return value
      */
     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-    axis2_stracat(const axis2_char_t *s1, 
-                  const axis2_char_t *s2, 
-                  const axis2_env_t *env);
+    axis2_stracat(const axis2_char_t *s1,
+        const axis2_char_t *s2,
+        const axis2_env_t *env);
 
     /**
      * Concatenate multiple strings, allocating memory
@@ -110,92 +109,85 @@
      */
     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
     axis2_strcat(const axis2_env_t *env, ...);
-        
+
     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
-    axis2_strstr (const axis2_char_t *heystack,
-                  const axis2_char_t *needle);
+    axis2_strstr(const axis2_char_t *heystack,
+        const axis2_char_t *needle);
 
     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
-    axis2_rindex(const axis2_char_t *s, 
-                 axis2_char_t c);
-    /* replaces s1 with s2 */                 
+    axis2_rindex(const axis2_char_t *s,
+        axis2_char_t c);
+
+    /* replaces s1 with s2 */
     AXIS2_EXTERN axis2_char_t* AXIS2_CALL
     axis2_replace(const axis2_env_t *env,
-                  axis2_char_t *str,
-                  int s1,
-                  int s2);
-                                   
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_strltrim(
-           const axis2_env_t *env,
-           const axis2_char_t *_s,
-           const axis2_char_t *_trim);
-
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
-   axis2_strrtrim(
-           const axis2_env_t *env,
-           const axis2_char_t *_s,
-           const axis2_char_t *_trim);
-
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL 
-   axis2_strtrim(
-           const axis2_env_t *env,
-           const axis2_char_t *_s,
-           const axis2_char_t *_trim);
-   
-   /**
-    * replace given axis2_character with a new one.
-    * @param str       string operation apply
-    * @param old_char  the old axis2_character which would be replaced
-    * @param new_char  new axis2_char_tacter
-    * @return      replaced string
-    */
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_string_replace(
-           axis2_char_t *str,
-           axis2_char_t old_char,
-           axis2_char_t new_char);
-
-   /**
-    * gives a sub string starting with given index.
-    * @param str       string operation apply
-    * @param c     starting index
-    * @return      substring
-    */
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_string_substring_starting_at(
-           axis2_char_t *str,
-           int s );
-   
-   /**
-    * gives a sub string ending with given index.
-    * @param str       string operation apply
-    * @param c     ending index
-    * @return      substring
-    */
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_string_substring_ending_at(
-           axis2_char_t *str,
-           int e );
-   
-   /**
-    * set a string to lowercase.
-    * @param str   string
-    * @return string with lowercase
-    */
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_string_tolower(
-           axis2_char_t *str );
-    
-   /**
-    * set a string to uppercase.
-    * @param str   string
-    * @return string with uppercase
-    */
-   AXIS2_EXTERN axis2_char_t* AXIS2_CALL
-   axis2_string_toupper(
-           axis2_char_t *str );
-   
+        axis2_char_t *str,
+        int s1,
+        int s2);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_strltrim(const axis2_env_t *env,
+        const axis2_char_t *_s,
+        const axis2_char_t *_trim);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_strrtrim(const axis2_env_t *env,
+        const axis2_char_t *_s,
+        const axis2_char_t *_trim);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_strtrim(const axis2_env_t *env,
+        const axis2_char_t *_s,
+        const axis2_char_t *_trim);
+
+    /**
+     * replace given axis2_character with a new one.
+     * @param str       string operation apply
+     * @param old_char  the old axis2_character which would be replaced
+     * @param new_char  new axis2_char_tacter
+     * @return      replaced string
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_string_replace(axis2_char_t *str,
+        axis2_char_t old_char,
+        axis2_char_t new_char);
+
+    /**
+     * gives a sub string starting with given index.
+     * @param str       string operation apply
+     * @param c     starting index
+     * @return      substring
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_string_substring_starting_at(axis2_char_t *str,
+        int s);
+
+    /**
+     * gives a sub string ending with given index.
+     * @param str       string operation apply
+     * @param c     ending index
+     * @return      substring
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_string_substring_ending_at(axis2_char_t *str,
+        int e);
+
+    /**
+     * set a string to lowercase.
+     * @param str   string
+     * @return string with lowercase
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_string_tolower(axis2_char_t *str);
+
+    /**
+     * set a string to uppercase.
+     * @param str   string
+     * @return string with uppercase
+     */
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_string_toupper(axis2_char_t *str);
+
     /**
      * Finds the first occurrence of the substring needle in the string 
      * haystack, ignores the case of both arguments. 
@@ -205,10 +197,9 @@
      * or NULL  if  the  substring  is  not found
      */
     AXIS2_EXTERN axis2_char_t * AXIS2_CALL
-    axis2_strcasestr(
-            const axis2_char_t *heystack, 
-            const axis2_char_t *needle);
-   
+    axis2_strcasestr(const axis2_char_t *heystack,
+        const axis2_char_t *needle);
+
 
 #define AXIS2_STRDUP(pts, env) \
         axis2_strdup(pts, env)
@@ -221,33 +212,33 @@
 
 #define AXIS2_MEMCHR(pts, c, n) \
         axis2_memchr(pts, c, n)
-        
+
 #define AXIS2_STRCMP(s1, s2) \
         axis2_strcmp(s1, s2)
-        
+
 #define AXIS2_STRNCMP(s1, s2, n) \
         axis2_strncmp(s1, s2, n)
-        
+
 #define AXIS2_STRLEN(s) \
         axis2_strlen(s)
-        
+
 #define AXIS2_STRCASECMP(s1,s2) \
         axis2_strcasecmp(s1,s2)
-        
+
 #define AXIS2_STRNCASECMP(s1,s2,n) \
         axis2_strncasecmp(s1,s2,n)
-        
+
 #define AXIS2_STRACAT(s1, s2, env) \
         axis2_stracat(s1, s2, env)
-        
+
 #define AXIS2_STRSTR(s1, s2) \
         axis2_strstr(s1, s2)
-        
+
 #define AXIS2_RINDEX(s, c) \
         axis2_rindex(s, c)
-        
+
 #define AXIS2_REPLACE(env, str, s1, s2) \
-        axis2_replace(env, str, s1, s2)        
+        axis2_replace(env, str, s1, s2)
 
 #define AXIS2_STRLTRIM(env, s, trim) \
       axis2_strltrim(env, s, trim)
@@ -258,8 +249,8 @@
 #define AXIS2_STRTRIM(env, s, trim) \
       axis2_strtrim(env, s, trim)
 
-/** @} */
-    
+    /** @} */
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/include/axis2_string_util.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_string_util.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_string_util.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_string_util.h Mon Jan  8 18:20:08 2007
@@ -25,22 +25,24 @@
 {
 #endif
 
-AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
-axis2_tokenize(const axis2_env_t *env,
-               axis2_char_t *in, 
-               int delim);
+    AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
+    axis2_tokenize(const axis2_env_t *env,
+        axis2_char_t *in,
+        int delim);
 
-AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
-axis2_first_token(const axis2_env_t *env,
-                  axis2_char_t *in,
-                  int delim);
+    AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
+    axis2_first_token(const axis2_env_t *env,
+        axis2_char_t *in,
+        int delim);
 
-AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
-axis2_last_token(const axis2_env_t *env,
-                 axis2_char_t *in,
-                 int delim);
+    AXIS2_EXTERN axis2_array_list_t * AXIS2_CALL
+    axis2_last_token(const axis2_env_t *env,
+        axis2_char_t *in,
+        int delim);
 
 #ifdef __cplusplus
 }
 #endif
 #endif /* AXIS2_STRING_UTIL_H */
+
+

Modified: webservices/axis2/trunk/c/util/include/axis2_thread.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_thread.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_thread.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_thread.h Mon Jan  8 18:20:08 2007
@@ -35,176 +35,182 @@
 {
 #endif
 
-/**
- * @defgroup axis2_thread thread
- * @ingroup axis2_util
- * @{
- */
-   
-/**
- * Thread callbacks from axis2 functions must be declared with AXIS2_THREAD_FUNC
- * so that they follow the platform's calling convention.
- */
-/*#define AXIS2_THREAD_FUNC*/
-   
-/** Thread structure. */
-typedef struct axis2_thread_t           axis2_thread_t;
-
-/** Thread attributes structure. */
-typedef struct axis2_threadattr_t       axis2_threadattr_t;
-
-/** Control variable for one-time atomic variables.  */
-typedef struct axis2_thread_once_t      axis2_thread_once_t;
-
-/**
- * The prototype for any AXIS2 thread worker functions.
- */
-typedef void *(AXIS2_THREAD_FUNC *axis2_thread_start_t)(axis2_thread_t*, void*);
-
-/** Thread private address space. */
-typedef struct axis2_threadkey_t        axis2_threadkey_t;
-
-/* Thread Function definitions */
-
-/**
- * Create and initialize a new threadattr variable
- * @param cont The pool to use
- * @return Newly created thread attribute
- */
-AXIS2_EXTERN axis2_threadattr_t* AXIS2_CALL 
-axis2_threadattr_create(axis2_allocator_t *allocator);
-
-/**
- * Set if newly created threads should be created in detached state.
- * @param attr The threadattr to affect
- * @param on Non-zero if detached threads should be created.
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_threadattr_detach_set(axis2_threadattr_t *attr, axis2_bool_t detached);
-
-/**
- * Get the detach state for this threadattr.
- * @param attr The threadattr to reference
- * @return AXIS2_TRUE if threads are to be detached, or AXIS2_FALSE
- * if threads are to be joinable.
- */
-AXIS2_EXTERN axis2_bool_t AXIS2_CALL
-axis2_threadattr_is_detach(axis2_threadattr_t *attr, axis2_allocator_t *allocator);
-
-
-/**
- * Create a new thread of execution
- * @param attr The threadattr to use to determine how to create the thread
- * @param func The function to start the new thread in
- * @param data Any data to be passed to the starting function
- * @param cont The pool to use
- * @return The newly created thread handle.
- */
-AXIS2_EXTERN axis2_thread_t* AXIS2_CALL 
-axis2_thread_create(axis2_allocator_t *allocator, axis2_threadattr_t *attr,
-                        axis2_thread_start_t func, void *data);
-
-/**
- * Stop the current thread
- * @param thd The thread to stop
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_exit(axis2_thread_t *thd, axis2_allocator_t *allocator);
-
-/**
- * Block until the desired thread stops executing.
- * @param thd The thread to join
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_join(axis2_thread_t *thd);
-
-/**
- * force the current thread to yield the processor
- */
-AXIS2_EXTERN void AXIS2_CALL 
-axis2_thread_yield();
-
-/**
- * Initialize the control variable for axis2_thread_once.
- * @param control The control variable to initialize
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_thread_once_t* AXIS2_CALL 
-axis2_thread_once_init(axis2_allocator_t *allocator);
-
-/**
- * Run the specified function one time, regardless of how many threads
- * call it.
- * @param control The control variable.  The same variable should
- *                be passed in each time the function is tried to be
- *                called.  This is how the underlying functions determine
- *                if the function has ever been called before.
- * @param func The function to call.
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_thread_once(axis2_thread_once_t *control, void (*func)(void));
-
-/**
- * detach a thread
- * @param thd The thread to detach
- * @return The status of the operation
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_detach(axis2_thread_t *thd);
+    /**
+     * @defgroup axis2_thread thread
+     * @ingroup axis2_util
+     * @{
+     */
+
+    /**
+     * Thread callbacks from axis2 functions must be declared with AXIS2_THREAD_FUNC
+     * so that they follow the platform's calling convention.
+     */
+    /*#define AXIS2_THREAD_FUNC*/
+
+    /** Thread structure. */
+    typedef struct axis2_thread_t           axis2_thread_t;
+
+    /** Thread attributes structure. */
+    typedef struct axis2_threadattr_t       axis2_threadattr_t;
+
+    /** Control variable for one-time atomic variables.  */
+    typedef struct axis2_thread_once_t      axis2_thread_once_t;
+
+    /**
+     * The prototype for any AXIS2 thread worker functions.
+     */
+    typedef void *(AXIS2_THREAD_FUNC *axis2_thread_start_t)(axis2_thread_t*, void*);
+
+    /** Thread private address space. */
+    typedef struct axis2_threadkey_t        axis2_threadkey_t;
+
+    /* Thread Function definitions */
+
+    /**
+     * Create and initialize a new threadattr variable
+     * @param cont The pool to use
+     * @return Newly created thread attribute
+     */
+    AXIS2_EXTERN axis2_threadattr_t* AXIS2_CALL
+    axis2_threadattr_create(axis2_allocator_t *allocator);
+
+    /**
+     * Set if newly created threads should be created in detached state.
+     * @param attr The threadattr to affect
+     * @param on Non-zero if detached threads should be created.
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_threadattr_detach_set(axis2_threadattr_t *attr, 
+        axis2_bool_t detached);
+
+    /**
+     * Get the detach state for this threadattr.
+     * @param attr The threadattr to reference
+     * @return AXIS2_TRUE if threads are to be detached, or AXIS2_FALSE
+     * if threads are to be joinable.
+     */
+    AXIS2_EXTERN axis2_bool_t AXIS2_CALL
+    axis2_threadattr_is_detach(axis2_threadattr_t *attr, 
+        axis2_allocator_t *allocator);
+
+
+    /**
+     * Create a new thread of execution
+     * @param attr The threadattr to use to determine how to create the thread
+     * @param func The function to start the new thread in
+     * @param data Any data to be passed to the starting function
+     * @param cont The pool to use
+     * @return The newly created thread handle.
+     */
+    AXIS2_EXTERN axis2_thread_t* AXIS2_CALL
+    axis2_thread_create(axis2_allocator_t *allocator, 
+        axis2_threadattr_t *attr,
+        axis2_thread_start_t func, void *data);
+
+    /**
+     * Stop the current thread
+     * @param thd The thread to stop
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_exit(axis2_thread_t *thd, 
+        axis2_allocator_t *allocator);
+
+    /**
+     * Block until the desired thread stops executing.
+     * @param thd The thread to join
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_join(axis2_thread_t *thd);
+
+    /**
+     * force the current thread to yield the processor
+     */
+    AXIS2_EXTERN void AXIS2_CALL
+    axis2_thread_yield();
+
+    /**
+     * Initialize the control variable for axis2_thread_once.
+     * @param control The control variable to initialize
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_thread_once_t* AXIS2_CALL
+    axis2_thread_once_init(axis2_allocator_t *allocator);
+
+    /**
+     * Run the specified function one time, regardless of how many threads
+     * call it.
+     * @param control The control variable.  The same variable should
+     *                be passed in each time the function is tried to be
+     *                called.  This is how the underlying functions determine
+     *                if the function has ever been called before.
+     * @param func The function to call.
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_once(axis2_thread_once_t *control, 
+        void(*func)(void));
+
+    /**
+     * detach a thread
+     * @param thd The thread to detach
+     * @return The status of the operation
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_detach(axis2_thread_t *thd);
 
-/*************************Thread locking functions*****************************/
+    /*************************Thread locking functions*****************************/
 
-/** Opaque thread-local mutex structure */
-typedef struct axis2_thread_mutex_t axis2_thread_mutex_t;
+    /** Opaque thread-local mutex structure */
+    typedef struct axis2_thread_mutex_t axis2_thread_mutex_t;
 
 #define AXIS2_THREAD_MUTEX_DEFAULT  0x0   /**< platform-optimal lock behavior */
 #define AXIS2_THREAD_MUTEX_NESTED   0x1   /**< enable nested (recursive) locks */
 #define AXIS2_THREAD_MUTEX_UNNESTED 0x2   /**< disable nested locks */
 
-/**
- * Create and initialize a mutex that can be used to synchronize threads.
- * @param allocator Memory allocator to allocate memory for the mutex
- * @warning Be cautious in using AXIS2_THREAD_MUTEX_DEFAULT.  While this is the
- * most optimial mutex based on a given platform's performance charateristics,
- * it will behave as either a nested or an unnested lock.
- */
-AXIS2_EXTERN axis2_thread_mutex_t * AXIS2_CALL
-axis2_thread_mutex_create(axis2_allocator_t *allocator, unsigned int flags);
-/**
- * Acquire the lock for the given mutex. If the mutex is already locked,
- * the current thread will be put to sleep until the lock becomes available.
- * @param mutex the mutex on which to acquire the lock.
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_mutex_lock(axis2_thread_mutex_t *mutex);
-
-/**
- * Attempt to acquire the lock for the given mutex. If the mutex has already
- * been acquired, the call returns immediately 
- * @param mutex the mutex on which to attempt the lock acquiring.
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_mutex_trylock(axis2_thread_mutex_t *mutex);
-
-/**
- * Release the lock for the given mutex.
- * @param mutex the mutex from which to release the lock.
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL 
-axis2_thread_mutex_unlock(axis2_thread_mutex_t *mutex);
-
-/**
- * Destroy the mutex and free the memory associated with the lock.
- * @param mutex the mutex to destroy.
- */
-AXIS2_EXTERN axis2_status_t AXIS2_CALL
-axis2_thread_mutex_destroy(axis2_thread_mutex_t *mutex);
+    /**
+     * Create and initialize a mutex that can be used to synchronize threads.
+     * @param allocator Memory allocator to allocate memory for the mutex
+     * @warning Be cautious in using AXIS2_THREAD_MUTEX_DEFAULT.  While this is the
+     * most optimial mutex based on a given platform's performance charateristics,
+     * it will behave as either a nested or an unnested lock.
+     */
+    AXIS2_EXTERN axis2_thread_mutex_t * AXIS2_CALL
+    axis2_thread_mutex_create(axis2_allocator_t *allocator, 
+        unsigned int flags);
+    /**
+     * Acquire the lock for the given mutex. If the mutex is already locked,
+     * the current thread will be put to sleep until the lock becomes available.
+     * @param mutex the mutex on which to acquire the lock.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_mutex_lock(axis2_thread_mutex_t *mutex);
+
+    /**
+     * Attempt to acquire the lock for the given mutex. If the mutex has already
+     * been acquired, the call returns immediately
+     * @param mutex the mutex on which to attempt the lock acquiring.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_mutex_trylock(axis2_thread_mutex_t *mutex);
+
+    /**
+     * Release the lock for the given mutex.
+     * @param mutex the mutex from which to release the lock.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_mutex_unlock(axis2_thread_mutex_t *mutex);
+
+    /**
+     * Destroy the mutex and free the memory associated with the lock.
+     * @param mutex the mutex to destroy.
+     */
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_thread_mutex_destroy(axis2_thread_mutex_t *mutex);
 
-/** @} */
+    /** @} */
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/include/axis2_thread_pool.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_thread_pool.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_thread_pool.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_thread_pool.h Mon Jan  8 18:20:08 2007
@@ -32,94 +32,94 @@
 {
 #endif
 
-/**
- * @defgroup axis2_thread_pool thread pool
- * @ingroup axis2_util 
- * @{
- */
- 
-typedef struct axis2_thread_pool_ops axis2_thread_pool_ops_t;
-typedef struct axis2_thread_pool axis2_thread_pool_t;
-struct axis2_env;
-
-/** 
-  * \brief Axis2 thread_pool
-  *
-  * Encapsulator for thread pooling routines
-  */
- struct axis2_thread_pool_ops
-{
-  /**
-   * Retrives a thread from the thread pool
-   * @param func function to be executed in the new thread
-   * @param data arguments to be passed to the function
-   * @return pointer to a thread in ready state.
-   */
-   axis2_thread_t * (AXIS2_CALL *
-   get_thread) (axis2_thread_pool_t *pool, 
-             axis2_thread_start_t func, 
-                 void *data);
-  /**
-   * Blocks until the desired thread stops executing.
-   * @param thd The thread to joined
-   * @return status of the operation
-   */
-   axis2_status_t (AXIS2_CALL *
-   join_thread) (axis2_thread_pool_t *pool, 
-              axis2_thread_t *thd);
-  /**
-   * Stop the execution of current thread
-   * @param thd thread to be stopped
-   * @return status of the operation
-   */
-   axis2_status_t (AXIS2_CALL *
-   exit_thread) (axis2_thread_pool_t *pool, 
-              axis2_thread_t *thd);
-  /**
-   * Detaches a thread
-   * @param thd thread to be detached
-   * @return status of the operation
-   */
-   axis2_status_t (AXIS2_CALL *
-   thread_detach) (axis2_thread_pool_t *pool, 
-               axis2_thread_t *thd);
-  /**
-   * Frees resources used by thread_pool
-   * @param pool thread_pool to be freed
-   */
-   axis2_status_t (AXIS2_CALL *
-   free) (axis2_thread_pool_t *pool);
-};
-
-/**
- * @brief Thread Pool struct
- * Axis2 Thread Pool
- */
- struct axis2_thread_pool
-{
-   axis2_thread_pool_ops_t *ops;
-};
-/**
-* Initializes (creates) an thread_pool.
-* @param allocator user defined allocator for the memory allocation.
-* @return initialized thread_pool. NULL on error.
-*/
-AXIS2_EXTERN axis2_thread_pool_t * AXIS2_CALL axis2_thread_pool_init(
-               axis2_allocator_t *allocator);
-
-/**
- * This function can be used to initialize the environment in case of 
- * spawning a new thread via a thread function
- */
-AXIS2_EXTERN struct axis2_env * AXIS2_CALL
-axis2_init_thread_env(const struct axis2_env *system_env);
-
-/**
- * This function can be used to free the environment that was used  
- * in a thread function
- */
-AXIS2_EXTERN void AXIS2_CALL
-axis2_free_thread_env(struct axis2_env *thread_env);
+    /**
+     * @defgroup axis2_thread_pool thread pool
+     * @ingroup axis2_util
+     * @{
+     */
+
+    typedef struct axis2_thread_pool_ops axis2_thread_pool_ops_t;
+    typedef struct axis2_thread_pool axis2_thread_pool_t;
+    struct axis2_env;
+
+    /**
+      * \brief Axis2 thread_pool
+      *
+      * Encapsulator for thread pooling routines
+      */
+    struct axis2_thread_pool_ops
+    {
+        /**
+         * Retrives a thread from the thread pool
+         * @param func function to be executed in the new thread
+         * @param data arguments to be passed to the function
+         * @return pointer to a thread in ready state.
+         */
+        axis2_thread_t *(AXIS2_CALL *
+                get_thread)(axis2_thread_pool_t *pool,
+                        axis2_thread_start_t func,
+                        void *data);
+        /**
+         * Blocks until the desired thread stops executing.
+         * @param thd The thread to joined
+         * @return status of the operation
+         */
+        axis2_status_t(AXIS2_CALL *
+                join_thread)(axis2_thread_pool_t *pool,
+                        axis2_thread_t *thd);
+        /**
+         * Stop the execution of current thread
+         * @param thd thread to be stopped
+         * @return status of the operation
+         */
+        axis2_status_t(AXIS2_CALL *
+                exit_thread)(axis2_thread_pool_t *pool,
+                        axis2_thread_t *thd);
+        /**
+         * Detaches a thread
+         * @param thd thread to be detached
+         * @return status of the operation
+         */
+        axis2_status_t(AXIS2_CALL *
+                thread_detach)(axis2_thread_pool_t *pool,
+                        axis2_thread_t *thd);
+        /**
+         * Frees resources used by thread_pool
+         * @param pool thread_pool to be freed
+         */
+        axis2_status_t(AXIS2_CALL *
+                free)(axis2_thread_pool_t *pool);
+    };
+
+    /**
+     * @brief Thread Pool struct
+     * Axis2 Thread Pool
+     */
+    struct axis2_thread_pool
+    {
+        axis2_thread_pool_ops_t *ops;
+    };
+    /**
+    * Initializes (creates) an thread_pool.
+    * @param allocator user defined allocator for the memory allocation.
+    * @return initialized thread_pool. NULL on error.
+    */
+    AXIS2_EXTERN axis2_thread_pool_t * AXIS2_CALL 
+    axis2_thread_pool_init(axis2_allocator_t *allocator);
+
+    /**
+     * This function can be used to initialize the environment in case of
+     * spawning a new thread via a thread function
+     */
+    AXIS2_EXTERN struct axis2_env * AXIS2_CALL
+    axis2_init_thread_env(const struct axis2_env *system_env);
+
+    /**
+     * This function can be used to free the environment that was used
+     * in a thread function
+     */
+    AXIS2_EXTERN void AXIS2_CALL
+    axis2_free_thread_env(struct axis2_env *thread_env);
 
 #define AXIS2_THREAD_POOL_GET_THREAD(thread_pool, func, data) \
       ((thread_pool)->ops->get_thread(thread_pool, func, data))
@@ -136,8 +136,8 @@
 #define AXIS2_THREAD_POOL_FREE(thread_pool) \
       ((thread_pool)->ops->free(thread_pool))
 
-/** @} */
-    
+    /** @} */
+
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/include/axis2_types.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_types.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_types.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_types.h Mon Jan  8 18:20:08 2007
@@ -27,21 +27,22 @@
 {
 #endif
 
-/**
- * @defgroup axis2_types type convertors
- * @ingroup axis2_util 
- * @{
- */
+    /**
+     * @defgroup axis2_types type convertors
+     * @ingroup axis2_util
+     * @{
+     */
 
     AXIS2_EXTERN int AXIS2_CALL
-    axis2_atoi (const char *s);
+    axis2_atoi(const char *s);
 
 #define AXIS2_ATOI(s) axis2_atoi(s)
 
-/** @} */
-    
+    /** @} */
+
 #ifdef __cplusplus
 }
 #endif
 
 #endif                          /* AXIS2_TYPES_H */
+

Modified: webservices/axis2/trunk/c/util/include/axis2_uri.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_uri.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_uri.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_uri.h Mon Jan  8 18:20:08 2007
@@ -30,14 +30,15 @@
 #include <axis2_env.h>
 
 #ifdef __cplusplus
-extern "C" {
+extern "C"
+{
 #endif
 
-/**
- * @defgroup axis2_uri URI
- * @ingroup axis2_util
- * @{
- */
+    /**
+     * @defgroup axis2_uri URI
+     * @ingroup axis2_util
+     * @{
+     */
 
 #define AXIS2_URI_FTP_DEFAULT_PORT         21 /**< default FTP port */
 #define AXIS2_URI_SSH_DEFAULT_PORT         22 /**< default SSH port */
@@ -58,44 +59,92 @@
 #define AXIS2_URI_TIP_DEFAULT_PORT       3372 /**< default TIP port */
 #define AXIS2_URI_SIP_DEFAULT_PORT       5060 /**< default SIP port */
 
-/** Flags passed to unparse_uri_components(): */
-/** suppress "scheme://user\@site:port" */
+    /** Flags passed to unparse_uri_components(): */
+    /** suppress "scheme://user\@site:port" */
 #define AXIS2_URI_UNP_OMITSITEPART    (1U<<0)
-/** Just omit user */
+    /** Just omit user */
 #define AXIS2_URI_UNP_OMITUSER        (1U<<1)
-/** Just omit password */
+    /** Just omit password */
 #define AXIS2_URI_UNP_OMITPASSWORD    (1U<<2)
-/** omit "user:password\@" part */
+    /** omit "user:password\@" part */
 #define AXIS2_URI_UNP_OMITUSERINFO    (AXIS2_URI_UNP_OMITUSER | \
                                      AXIS2_URI_UNP_OMITPASSWORD)
-/** Show plain text password (default: show XXXXXXXX) */
+    /** Show plain text password (default: show XXXXXXXX) */
 #define AXIS2_URI_UNP_REVEALPASSWORD  (1U<<3)
-/** Show "scheme://user\@site:port" only */
+    /** Show "scheme://user\@site:port" only */
 #define AXIS2_URI_UNP_OMITPATHINFO    (1U<<4)
-/** Omit the "?queryarg" from the path */
+    /** Omit the "?queryarg" from the path */
 #define AXIS2_URI_UNP_OMITQUERY       (1U<<5)
 
-/** @see axis2_uri_t */
-typedef  unsigned short  axis2_port_t;
-/* axis2_uri.c */
+    /** @see axis2_uri_t */
+    typedef  unsigned short  axis2_port_t;
+    /* axis2_uri.c */
 
+    typedef struct axis2_uri axis2_uri_t;
 
-typedef struct axis2_uri_ops axis2_uri_ops_t;
-typedef struct axis2_uri axis2_uri_t;
-
-    
-/** 
- * @brief URI ops struct
- * Encapsulator struct for ops of axis2_uri
- */  
- struct axis2_uri_ops
-{
+    /**
+     * Return the default port for a given scheme.  The schemes recognized are
+     * http, ftp, https, gopher, wais, nntp, snews, and prospero
+     * @param scheme_str The string that contains the current scheme
+     * @return The default port for this scheme
+     */
+    AXIS2_EXTERN axis2_port_t AXIS2_CALL
+    axis2_uri_port_of_scheme(
+        const axis2_char_t *scheme_str);
+
+    /**
+     * Parse a given URI, fill in all supplied fields of a axis2_uri_t
+     * structure. This eliminates the necessity of extracting host, port,
+     * path, query info repeatedly in the modules.
+     * @param uri The uri to parse
+     * @param uptr The axis2_uri_t to fill out
+     * @return AXIS2_SUCCESS for success or error code
+     */
+    AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
+    axis2_uri_parse_string(
+        const axis2_env_t *env,
+        const axis2_char_t *uri);
+
+    /**
+     * Special case for CONNECT parsing: it comes with the hostinfo part only
+     * @param hostinfo The hostinfo string to parse
+     * @param uptr The axis2_uri_t to fill out
+     * @return AXIS2_SUCCESS for success or error code
+     */
+    AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
+    axis2_uri_parse_hostinfo(
+        const axis2_env_t *env,
+        const axis2_char_t *hostinfo);
+
+    /** Resolve relative to a base.  This means host/etc, and (crucially) path */
+    AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
+    axis2_uri_resolve_relative(
+        const axis2_env_t *env,
+        const axis2_uri_t* base,
+        axis2_uri_t* uptr);
+
+    /**
+     * Return a URI created from a context URI and a relative URI.
+     * If a valid URI cannot be created the only other possibility
+     * this method will consider is that an absolute file path has
+     * been passed in as the relative URI argument, and it will try
+     * to create a 'file' URI from it.
+     *
+     * @param context_uri the document base URI
+     * @param uri a file URI relative to the context_uri or an
+     * absolute file path
+     * @return the URIcreated from context_uri and uri
+     */
+    AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
+    axis2_uri_parse_relative(
+        const axis2_env_t *env,
+        const axis2_uri_t* base,
+        const char* uri);
 
-    axis2_status_t (AXIS2_CALL *
-    free) (
-            axis2_uri_t *uri, 
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_uri_free(axis2_uri_t *uri,
             const axis2_env_t *env);
- 
+
     /**
      * Unparse a axis2_uri_t structure to an URI string.  Optionally 
      * suppress the password for security reasons.
@@ -112,132 +161,53 @@
      * </PRE>
      * @return The uri as a string
      */
-    axis2_char_t* (AXIS2_CALL *
-    to_string) (
-            const axis2_uri_t *uri, 
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_uri_to_string(const axis2_uri_t *uri,
             const axis2_env_t *env,
             unsigned flags);
-   
-    axis2_char_t* (AXIS2_CALL *
-    get_protocol) (
-            axis2_uri_t *uri, 
-            const axis2_env_t *env);
-   
-    axis2_char_t* (AXIS2_CALL *
-    get_server)(
-            axis2_uri_t *uri, 
-            const axis2_env_t *env);
-            
-    axis2_port_t (AXIS2_CALL *
-    get_port) (
-            axis2_uri_t *uri, 
-            const axis2_env_t *env);
-            
-    axis2_char_t* (AXIS2_CALL *
-    get_path)(
-            axis2_uri_t *uri, 
-            const axis2_env_t *env);
-
-    axis2_uri_t* (AXIS2_CALL *
-    clone) (
-            const axis2_uri_t *uri,
-            const axis2_env_t *env);
-};
-
-/** 
- * @brief URI struct
- *    Axis2 URI
- */
- struct axis2_uri
-{
-    axis2_uri_ops_t *ops;    
-};
 
-/**
- * Return the default port for a given scheme.  The schemes recognized are
- * http, ftp, https, gopher, wais, nntp, snews, and prospero
- * @param scheme_str The string that contains the current scheme
- * @return The default port for this scheme
- */ 
-AXIS2_EXTERN axis2_port_t AXIS2_CALL
-axis2_uri_port_of_scheme(
-        const axis2_char_t *scheme_str);
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_uri_get_protocol(axis2_uri_t *uri,
+            const axis2_env_t *env);
 
-/**
- * Parse a given URI, fill in all supplied fields of a axis2_uri_t
- * structure. This eliminates the necessity of extracting host, port,
- * path, query info repeatedly in the modules.
- * @param uri The uri to parse
- * @param uptr The axis2_uri_t to fill out
- * @return AXIS2_SUCCESS for success or error code
- */
-AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
-axis2_uri_parse_string(
-        const axis2_env_t *env, 
-        const axis2_char_t *uri);
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_uri_get_server(axis2_uri_t *uri,
+            const axis2_env_t *env);
 
-/**
- * Special case for CONNECT parsing: it comes with the hostinfo part only
- * @param hostinfo The hostinfo string to parse
- * @param uptr The axis2_uri_t to fill out
- * @return AXIS2_SUCCESS for success or error code
- */
-AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
-axis2_uri_parse_hostinfo(
-        const axis2_env_t *env, 
-        const axis2_char_t *hostinfo);
+    AXIS2_EXTERN axis2_port_t AXIS2_CALL
+    axis2_uri_get_port(axis2_uri_t *uri,
+            const axis2_env_t *env);
 
-/** Resolve relative to a base.  This means host/etc, and (crucially) path */
-AXIS2_EXTERN axis2_uri_t *AXIS2_CALL 
-axis2_uri_resolve_relative(
-        const axis2_env_t *env,
-        const axis2_uri_t* base,
-        axis2_uri_t* uptr);
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_uri_get_path(axis2_uri_t *uri,
+            const axis2_env_t *env);
 
-/**
- * Return a URI created from a context URI and a relative URI.
- * If a valid URI cannot be created the only other possibility
- * this method will consider is that an absolute file path has
- * been passed in as the relative URI argument, and it will try
- * to create a 'file' URI from it.
- *
- * @param context_uri the document base URI
- * @param uri a file URI relative to the context_uri or an
- * absolute file path
- * @return the URIcreated from context_uri and uri
- */
-AXIS2_EXTERN axis2_uri_t *AXIS2_CALL 
-axis2_uri_parse_relative(
-        const axis2_env_t *env,
-        const axis2_uri_t* base,
-        const char* uri);
+    AXIS2_EXTERN axis2_uri_t* AXIS2_CALL
+    axis2_uri_clone(const axis2_uri_t *uri,
+            const axis2_env_t *env);
 
-/************************** Start of function macros **************************/
-      
 #define AXIS2_URI_FREE(uri, env) \
-      ((uri)->ops->free(uri, env))
+      axis2_uri_free(uri, env)
 
 #define AXIS2_URI_TO_STRING(uri, env, flags) \
-      (((axis2_uri_t *) uri)->ops->to_string(uri, env, flags))
+      axis2_uri_to_string(uri, env, flags)
 
 #define AXIS2_URI_GET_PROTOCOL(uri, env) \
-      ((uri)->ops->get_protocol(uri, env))
-      
+      axis2_uri_get_protocol(uri, env)
+
 #define AXIS2_URI_GET_SERVER(uri, env) \
-      ((uri)->ops->get_server(uri, env))
-      
+      axis2_uri_get_server(uri, env)
+
 #define AXIS2_URI_GET_PORT(uri, env) \
-      ((uri)->ops->get_port(uri, env))
-      
+      axis2_uri_get_port(uri, env)
+
 #define AXIS2_URI_GET_PATH(uri, env) \
-      ((uri)->ops->get_path(uri, env))
-      
-#define AXIS2_URI_CLONE(uri, env) \
-      ((uri)->ops->clone(uri, env))
+      axis2_uri_get_path(uri, env)
 
-/************************** End of function macros ****************************/    
+#define AXIS2_URI_CLONE(uri, env) \
+      axis2_uri_clone(uri, env)
 
-/** @} */
+    /** @} */
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/include/axis2_url.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_url.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_url.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_url.h Mon Jan  8 18:20:08 2007
@@ -23,7 +23,7 @@
   * @file axis2_url.h
   * @brief axis2 URL container implementation
   */
-  
+
 #include <axis2_utils.h>
 #include <axis2_utils_defines.h>
 #include <axis2_env.h>
@@ -34,145 +34,116 @@
 {
 #endif
 
-/**
- * @ingroup axis2_core_transport_http
- * @{
- */
-
-typedef struct axis2_url_ops axis2_url_ops_t;
-typedef struct axis2_url axis2_url_t;
-
-    
-/** 
- * @brief URL ops struct
- * Encapsulator struct for ops of axis2_url
- */  
- struct axis2_url_ops
-{
-    axis2_char_t* (AXIS2_CALL *
-   to_external_form) (axis2_url_t *url, 
-                       const axis2_env_t *env);
-   
-    axis2_status_t (AXIS2_CALL *
-   set_protocol)(axis2_url_t *url, 
-                  const axis2_env_t *env, 
-                 axis2_char_t *protocol);
-   
-   
-   axis2_char_t* (AXIS2_CALL *
-   get_protocol) (axis2_url_t *url, 
-                   const axis2_env_t *env);
-   
-   axis2_status_t (AXIS2_CALL *
-   set_server)(axis2_url_t *url, 
-                const axis2_env_t *env, 
-            axis2_char_t *server);
-   
-   
-    axis2_char_t* (AXIS2_CALL *
-   get_server)(axis2_url_t *url, 
-                const axis2_env_t *env);
-            
-            
-   axis2_status_t (AXIS2_CALL *
-   set_port)(axis2_url_t *url, 
-              const axis2_env_t *env, 
-           int port);
-           
-           
-    int (AXIS2_CALL *
-   get_port) (axis2_url_t *url, 
-               const axis2_env_t *env);
-            
-            
-   axis2_status_t (AXIS2_CALL *
-   set_path)(axis2_url_t *url, 
-              const axis2_env_t *env, 
-           axis2_char_t *path);
-           
-           
-   axis2_char_t* (AXIS2_CALL *
-   get_path)(axis2_url_t *url, 
-              const axis2_env_t *env);
-
-    axis2_url_t* (AXIS2_CALL *
-    clone) (
-            axis2_url_t *url,
-            const axis2_env_t *env);
-
-    axis2_status_t (AXIS2_CALL *
-   free_fn) (axis2_url_t *url, 
-           const axis2_env_t *env);
-};
-
-/** 
- * @brief URL struct
- *    Axis2 URL
- */
- struct axis2_url
-{
-    axis2_url_ops_t *ops;    
-};
-
-
-AXIS2_EXTERN axis2_url_t * AXIS2_CALL 
-axis2_url_create (
-        const axis2_env_t *env, 
-        const axis2_char_t *protocol, 
-        const axis2_char_t *server, 
-        const int port, 
+    /**
+     * @ingroup axis2_core_transport_http
+     * @{
+     */
+
+    typedef struct axis2_url axis2_url_t;
+
+    AXIS2_EXTERN axis2_url_t * AXIS2_CALL
+    axis2_url_create(
+        const axis2_env_t *env,
+        const axis2_char_t *protocol,
+        const axis2_char_t *server,
+        const int port,
         const axis2_char_t *path);
 
-AXIS2_EXTERN axis2_url_t * AXIS2_CALL
-axis2_url_parse_string(
-        const axis2_env_t *env, 
+    AXIS2_EXTERN axis2_url_t * AXIS2_CALL
+    axis2_url_parse_string(
+        const axis2_env_t *env,
         const axis2_char_t *str_url);
 
-axis2_uri_t *AXIS2_CALL
-axis2_url_to_uri(
+    AXIS2_EXTERN axis2_uri_t *AXIS2_CALL
+    axis2_url_to_uri(
         axis2_url_t *url,
         const axis2_env_t *env);
 
-/************************** Start of function macros **************************/
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_url_to_external_form(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_url_set_protocol(axis2_url_t *url,
+        const axis2_env_t *env,
+        axis2_char_t *protocol);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_url_get_protocol(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_url_set_server(axis2_url_t *url,
+        const axis2_env_t *env,
+        axis2_char_t *server);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_url_get_server(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_url_set_port(axis2_url_t *url,
+        const axis2_env_t *env,
+        int port);
+
+    AXIS2_EXTERN int AXIS2_CALL
+    axis2_url_get_port(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_url_set_path(axis2_url_t *url,
+        const axis2_env_t *env,
+        axis2_char_t *path);
+
+    AXIS2_EXTERN axis2_char_t* AXIS2_CALL
+    axis2_url_get_path(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_url_t* AXIS2_CALL
+    axis2_url_clone(axis2_url_t *url,
+        const axis2_env_t *env);
+
+    AXIS2_EXTERN axis2_status_t AXIS2_CALL
+    axis2_url_free(axis2_url_t *url,
+        const axis2_env_t *env);
 
 #define AXIS2_URL_TO_EXTERNAL_FORM(url, env) \
-      ((url)->ops->to_external_form(url, env))
+      axis2_url_to_external_form(url, env)
 
 #define AXIS2_URL_SET_PROTOCOL(url, env, protocol) \
-        ((url)->ops->set_prtocol(url, env, protocol))
-      
+        axis2_url_set_prtocol(url, env, protocol)
+
 #define AXIS2_URL_GET_PROTOCOL(url, env) \
-      ((url)->ops->get_protocol(url, env))
-      
+        axis2_url_get_protocol(url, env)
+
 #define AXIS2_URL_SET_SERVER(url, env, server) \
-        ((url)->ops->set_server(url, env, server))
-      
+        axis2_url_set_server(url, env, server)
+
 #define AXIS2_URL_GET_SERVER(url, env) \
-      ((url)->ops->get_server(url, env))
-      
+        axis2_url_get_server(url, env)
+
 #define AXIS2_URL_SET_PORT(url, env, port) \
-      ((url)->ops->set_port(url, env, port))
-      
+        axis2_url_set_port(url, env, port)
+
 #define AXIS2_URL_GET_PORT(url, env) \
-      ((url)->ops->get_port(url, env))
-      
+        axis2_url_get_port(url, env)
+
 #define AXIS2_URL_SET_PATH(url, env, path) \
-        ((url)->ops->set_path(url, env, path))
-      
+        axis2_url_set_path(url, env, path)
+
 #define AXIS2_URL_GET_PATH(url, env) \
-      ((url)->ops->get_path(url, env))
-      
+        axis2_url_get_path(url, env)
+
 #define AXIS2_URL_CLONE(url, env) \
-      ((url)->ops->clone(url, env))
-      
-#define AXIS2_URL_FREE(url, env) \
-      ((url)->ops->free_fn(url, env))
+        axis2_url_clone(url, env)
 
-/************************** End of function macros ****************************/    
+#define AXIS2_URL_FREE(url, env) \
+        axis2_url_free(url, env)
 
-/** @} */
+    /** @} */
 #ifdef __cplusplus
 }
 #endif
 
 #endif                          /* AXIS2_URL_H */
+

Modified: webservices/axis2/trunk/c/util/include/axis2_utils.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_utils.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_utils.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_utils.h Mon Jan  8 18:20:08 2007
@@ -128,10 +128,6 @@
         AXIS2_SCOPE_APPLICATION
     };
 
-
-
-
-    
 #define AXIS2_REQUEST_URL_PREFIX "/services"
 #define AXIS2_TARGET_EPR "target_epr"
 #define AXIS2_DUMP_INPUT_MSG_TRUE "dump"
@@ -155,3 +151,4 @@
 #endif
 
 #endif                          /* AXIS2_UTILS_H */
+

Modified: webservices/axis2/trunk/c/util/include/axis2_uuid_gen.h
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/include/axis2_uuid_gen.h?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/include/axis2_uuid_gen.h (original)
+++ webservices/axis2/trunk/c/util/include/axis2_uuid_gen.h Mon Jan  8 18:20:08 2007
@@ -29,21 +29,21 @@
 #endif
 
 
-/**
- * @defgroup axis2_uuid_gen UUID generator
- * @ingroup axis2_util 
- * @{
- */
-   
-/**
- * generate a uuid
- * @return generated uuid as a string
- */ 
-AXIS2_EXTERN axis2_char_t *AXIS2_CALL
-axis2_uuid_gen(const axis2_env_t *env);
+    /**
+     * @defgroup axis2_uuid_gen UUID generator
+     * @ingroup axis2_util
+     * @{
+     */
+
+    /**
+     * generate a uuid
+     * @return generated uuid as a string
+     */
+    AXIS2_EXTERN axis2_char_t *AXIS2_CALL
+    axis2_uuid_gen(const axis2_env_t *env);
+
+    /** @} */
 
-/** @} */
-    
 #ifdef __cplusplus
 }
 #endif

Modified: webservices/axis2/trunk/c/util/src/stack.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/stack.c?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/src/stack.c (original)
+++ webservices/axis2/trunk/c/util/src/stack.c Mon Jan  8 18:20:08 2007
@@ -23,135 +23,62 @@
 
 #define AXIS2_STACK_DEFAULT_CAPACITY 10
 
-typedef struct axis2_stack_impl
+struct axis2_stack
 {
-    axis2_stack_t stack;
-
     void **data;
     /** current number of elements */
     int size;
     /** total capacity */
     int capacity;
-
     axis2_bool_t is_empty_stack;
-
-}
-axis2_stack_impl_t;
-
-#define AXIS2_INTF_TO_IMPL(stack) ((axis2_stack_impl_t *)stack)
-
-
-axis2_status_t AXIS2_CALL
-axis2_stack_free(axis2_stack_t *stack,
-        const axis2_env_t *env);
-
-void* AXIS2_CALL
-axis2_stack_pop(axis2_stack_t *stack,
-        const axis2_env_t *env);
-
-axis2_status_t AXIS2_CALL
-axis2_stack_push(axis2_stack_t *stack,
-        const axis2_env_t *env,
-        void* value);
-
-int AXIS2_CALL
-axis2_stack_size(axis2_stack_t *stack,
-        const axis2_env_t *env);
-
-void* AXIS2_CALL
-axis2_stack_get(axis2_stack_t *stack,
-        const axis2_env_t *env);
-
-void* AXIS2_CALL
-axis2_stack_get_at(axis2_stack_t *stack,
-        const axis2_env_t *env,
-        int i);
-
+};
 
 AXIS2_EXTERN axis2_stack_t * AXIS2_CALL
 axis2_stack_create(const axis2_env_t *env)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
+    axis2_stack_t *stack = NULL;
 
     AXIS2_ENV_CHECK(env, NULL);
 
-    stack_impl = (axis2_stack_impl_t*)AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_stack_impl_t));
+    stack = (axis2_stack_t*)AXIS2_MALLOC(env->allocator,
+            sizeof(axis2_stack_t));
 
-    if (!stack_impl)
+    if (!stack)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
         return NULL;
     }
 
-    stack_impl->data = NULL;
-    stack_impl->size = 0;
-    stack_impl->capacity = AXIS2_STACK_DEFAULT_CAPACITY;
-    stack_impl->is_empty_stack = AXIS2_TRUE;
-    stack_impl->stack.ops = NULL;
+    stack->data = NULL;
+    stack->size = 0;
+    stack->capacity = AXIS2_STACK_DEFAULT_CAPACITY;
+    stack->is_empty_stack = AXIS2_TRUE;
 
-    stack_impl->data = AXIS2_MALLOC(env->allocator, sizeof(void*) *
+    stack->data = AXIS2_MALLOC(env->allocator, sizeof(void*) *
             AXIS2_STACK_DEFAULT_CAPACITY);
-    if (NULL == stack_impl->data)
-    {
-        AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_stack_free(&(stack_impl->stack) , env);
-        return NULL;
-    }
-
-    stack_impl->stack.ops = (axis2_stack_ops_t *)AXIS2_MALLOC(env->allocator,
-            sizeof(axis2_stack_ops_t));
-
-    if (NULL ==  stack_impl->stack.ops)
+    if (NULL == stack->data)
     {
         AXIS2_ERROR_SET(env->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
-        axis2_stack_free(&(stack_impl->stack) , env);
+        axis2_stack_free(stack , env);
         return NULL;
     }
 
-
-    stack_impl->stack.ops->free =
-        axis2_stack_free;
-
-    stack_impl->stack.ops->pop =
-        axis2_stack_pop;
-
-    stack_impl->stack.ops->push =
-        axis2_stack_push;
-
-    stack_impl->stack.ops->size =
-        axis2_stack_size;
-
-    stack_impl->stack.ops->get =
-        axis2_stack_get;
-
-    stack_impl->stack.ops->get_at =
-        axis2_stack_get_at;
-
-    return &(stack_impl->stack);
+    return stack;
 }
 
 axis2_status_t AXIS2_CALL
 axis2_stack_free(axis2_stack_t *stack,
         const axis2_env_t *env)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
 
-    stack_impl = AXIS2_INTF_TO_IMPL(stack);
-
-    if (stack_impl->data)
-    {
-        AXIS2_FREE(env->allocator, stack_impl->data);
-        stack_impl->data = NULL;
-    }
-    if (stack->ops)
+    if (stack->data)
     {
-        AXIS2_FREE(env->allocator, stack->ops);
-        stack->ops = NULL;
+        AXIS2_FREE(env->allocator, stack->data);
+        stack->data = NULL;
     }
-    AXIS2_FREE(env->allocator, stack_impl);
-    stack_impl = NULL;
+    AXIS2_FREE(env->allocator, stack);
+    stack = NULL;
     return AXIS2_SUCCESS;
 }
 
@@ -159,24 +86,22 @@
 axis2_stack_pop(axis2_stack_t *stack,
         const axis2_env_t *env)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
     void *value = NULL;
     AXIS2_ENV_CHECK(env, NULL);
 
-    stack_impl = AXIS2_INTF_TO_IMPL(stack);
-    if (stack_impl->is_empty_stack == AXIS2_TRUE ||
-            stack_impl->size == 0)
+    if (stack->is_empty_stack == AXIS2_TRUE ||
+            stack->size == 0)
     {
         return NULL;
     }
-    if (stack_impl->size > 0)
+    if (stack->size > 0)
     {
-        value = stack_impl->data[stack_impl->size -1 ];
-        stack_impl->data[stack_impl->size-1] = NULL;
-        stack_impl->size--;
-        if (stack_impl->size == 0)
+        value = stack->data[stack->size -1 ];
+        stack->data[stack->size-1] = NULL;
+        stack->size--;
+        if (stack->size == 0)
         {
-            stack_impl->is_empty_stack = AXIS2_TRUE;
+            stack->is_empty_stack = AXIS2_TRUE;
         }
     }
     return value;
@@ -187,20 +112,18 @@
         const axis2_env_t *env,
         void* value)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK(env->error, value, AXIS2_FAILURE);
 
-    stack_impl = AXIS2_INTF_TO_IMPL(stack);
-    if ((stack_impl->size  < stack_impl->capacity) && (stack_impl->capacity > 0))
+    if ((stack->size  < stack->capacity) && (stack->capacity > 0))
     {
-        stack_impl->data[stack_impl->size++] = value;
+        stack->data[stack->size++] = value;
     }
     else
     {
         void **new_data = NULL;
 
-        int new_capacity = stack_impl->capacity + AXIS2_STACK_DEFAULT_CAPACITY;
+        int new_capacity = stack->capacity + AXIS2_STACK_DEFAULT_CAPACITY;
 
         new_data = AXIS2_MALLOC(env->allocator, sizeof(void*) * new_capacity);
         if (!new_data)
@@ -209,16 +132,16 @@
             return AXIS2_FAILURE;
         }
         memset(new_data, 0, sizeof(void*)*new_capacity);
-        memcpy(new_data, stack_impl->data, sizeof(void*) *(stack_impl->capacity));
-        stack_impl->capacity = new_capacity;
+        memcpy(new_data, stack->data, sizeof(void*) *(stack->capacity));
+        stack->capacity = new_capacity;
 
-        AXIS2_FREE(env->allocator, stack_impl->data);
-        stack_impl->data = NULL;
-        stack_impl->data = new_data;
+        AXIS2_FREE(env->allocator, stack->data);
+        stack->data = NULL;
+        stack->data = new_data;
 
-        stack_impl->data[stack_impl->size++] = value;
+        stack->data[stack->size++] = value;
     }
-    stack_impl->is_empty_stack = AXIS2_FALSE;
+    stack->is_empty_stack = AXIS2_FALSE;
     return AXIS2_SUCCESS;
 }
 
@@ -227,19 +150,17 @@
         const axis2_env_t *env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_FAILURE);
-    return AXIS2_INTF_TO_IMPL(stack)->size;
+    return stack->size;
 }
 
 void * AXIS2_CALL
 axis2_stack_get(axis2_stack_t *stack,
         const axis2_env_t *env)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
     AXIS2_ENV_CHECK(env, NULL);
-    stack_impl = AXIS2_INTF_TO_IMPL(stack);
-    if (stack_impl->size > 0)
+    if (stack->size > 0)
     {
-        return stack_impl->data[stack_impl->size-1];
+        return stack->data[stack->size-1];
     }
     return NULL;
 }
@@ -249,11 +170,9 @@
         const axis2_env_t *env,
         int i)
 {
-    axis2_stack_impl_t *stack_impl = NULL;
-    stack_impl = AXIS2_INTF_TO_IMPL(stack);
-    if ((stack_impl->size == 0) || (i < 0) || (i >= stack_impl->size))
+    if ((stack->size == 0) || (i < 0) || (i >= stack->size))
     {
         return NULL;
     }
-    return stack_impl->data[i];
+    return stack->data[i];
 }

Modified: webservices/axis2/trunk/c/util/src/types.c
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/util/src/types.c?view=diff&rev=494302&r1=494301&r2=494302
==============================================================================
--- webservices/axis2/trunk/c/util/src/types.c (original)
+++ webservices/axis2/trunk/c/util/src/types.c Mon Jan  8 18:20:08 2007
@@ -29,3 +29,5 @@
     }
     return n;
 }
+
+



---------------------------------------------------------------------
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