axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r345821 [4/8] - in /webservices/axis2/trunk/c: ./ include/ modules/test/om/src/ modules/util/src/ modules/xml/guththila/ modules/xml/om/src/ modules/xml/om/test/ modules/xml/parser/ modules/xml/parser/guththila/impl/src/ modules/xml/parser/...
Date Mon, 21 Nov 2005 03:57:03 GMT
Added: webservices/axis2/trunk/c/modules/test/om/src/namespaces.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/namespaces.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/namespaces.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/namespaces.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<foo:a xmlns:foo="http://fooNamespace/">
+  <b>
+    <c>Hello</c>
+  </b>
+
+  <foo:d>
+    <foo:e>Hey</foo:e>
+  </foo:d>
+
+  <bar:f xmlns:bar="http://barNamespace/">
+    <bar:g>Hey2</bar:g>
+  </bar:f>
+
+  <alias:x xmlns:alias="http://fooNamespace/">
+    <alias:y>Hey3</alias:y>
+  </alias:x>
+</foo:a>

Added: webservices/axis2/trunk/c/modules/test/om/src/nitf.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/nitf.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/nitf.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/nitf.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<nitf>
+
+  <!-- Example of markup of URLs (at the bottom of the story) -->
+
+ <head>
+  <meta name="ap-cycle" content="AP"/>
+  <meta name="ap-online-code" content="1700"/>
+  <meta name="ap-company" content="CO:Media Metrix Inc;TS:MMXI;IG:SVC;"/>
+  <meta name="ap-routing" content="ENTITLEMENTS,pfONLINE,pf1700"/>
+  <meta name="ap-format" content="bx"/>
+  <meta name="ap-category" content="f"/>
+  <meta name="ap-selector" content="-----"/>
+  <meta name="ap-transref" content="V0347"/>
+  <docdata>
+   <doc-id regsrc="AP" id-string="D76UIMO80"/>
+   <urgency ed-urg="7"/>
+   <date.issue norm="20000911T185842Z"/>
+   <du-key key="Napster Traffic"/>
+   <doc.copyright holder="(AP)"/>
+  </docdata>
+ </head>
+ <body>
+  <body.head>
+   <hedline>
+    <hl1>Use of Napster Quadruples</hl1>
+   </hedline>
+   <byline>By PETER SVENSSON
+    <byttl>AP Business Writer</byttl>
+   </byline>
+   <distributor>The Associated Press</distributor>
+   <dateline>
+    <location>NEW YORK</location>
+   </dateline>
+  </body.head>
+  <body.content>
+   <block>
+    <p>Despite the uncertain legality of the Napster online music-sharing service, the number of people
+using it more than quadrupled in just five months, Media Metrix said Monday.</p>
+    <p>That made Napster the fastest-growing software application ever recorded by the Internet research
+company.</p>
+    <p>From 1.1 million home users in the United States in February, the first month Media Metrix
+tracked the application, Napster use rocketed to 4.9 million users in July.</p>
+    <p>That represents 6 percent of U.S. home PC users who have modems, said Media Metrix, which pays
+people to install monitoring software on their computers.</p>
+    <p>It estimates total usage from a panel of about 50,000 people in the United States.</p>
+    <p>Napster was also used at work by 887,000 people in July, Media Metrix said.</p>
+    <p>Napster Inc. has been sued by the recording industry for allegedly enabling copyright
+infringement. The federal government weighed in on the case Friday, saying the service is not protected
+under a key copyright law, as the San Mateo, Calif., company claims.</p>
+    <p>Bruce Ryon, head of Media Metrix&apos;s New Media Group, said Napster was used by &quot;the full spectrum of PC users, not just the youth with time on their hands and a passion for music.&quot;</p>
+    <p>The Napster program allows users to copy digital music files from the hard drives of other
+users over the Internet.</p>
+    <p>Napster Inc. said last week that 28 million people had downloaded its program. It does not reveal
+its own figures for how many people actually use the software.</p>
+    <p>Because the program connects to the company&apos;s computers over the Internet every time
+it is run, Napster Inc. can track usage exactly.</p>
+    <p>__</p>
+    <p>On the Net:</p>
+    <p><a href="http://www.napster.com">
+http://www.napster.com</a></p>
+    <p><a href="http://www.mediametrix.com">
+http://www.mediametrix.com</a></p>
+   </block>
+  </body.content>
+ </body>
+</nitf>

Added: webservices/axis2/trunk/c/modules/test/om/src/numbers.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/numbers.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/numbers.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/numbers.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+
+<numbers>
+  <set>
+    <nr>3</nr>
+    <nr>24</nr>
+    <nr>55</nr>
+    <nr>11</nr>
+    <nr>2</nr>
+    <nr>-3</nr>
+  </set>
+  <set>
+    <nr value="66"/>
+    <nr value="123"/>
+    <nr value="55"/>
+    <nr value="9999"/>
+  </set>
+</numbers>

Added: webservices/axis2/trunk/c/modules/test/om/src/pi.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/pi.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/pi.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/pi.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<foo>
+	<?cheese is tasty?>
+	<bar>
+		<baz/>
+		<cheese/>
+		<baz/>
+		<?toast is tasty?>
+		<cheese/>
+		<baz/>
+	</bar>
+	<?cheese is gooey?>
+</foo>

Added: webservices/axis2/trunk/c/modules/test/om/src/pi2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/pi2.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/pi2.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/pi2.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0"?>
+<a>
+  <b>foo</b>
+  <?toc order-by="x"?>
+  <c>bar</c>
+</a>

Added: webservices/axis2/trunk/c/modules/test/om/src/simple.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/simple.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/simple.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/simple.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<root><a>a</a><b>b</b><c><d>d</d></c></root>

Added: webservices/axis2/trunk/c/modules/test/om/src/spaces.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/spaces.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/spaces.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/spaces.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<foo>
+    <bar>baz
+        <cheese id="3"/>
+        baz
+        <cheese/>
+        baz
+    </bar>
+    <doc><![CDATA[<foo>]]></doc>
+</foo>
\ No newline at end of file

Added: webservices/axis2/trunk/c/modules/test/om/src/t.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/t.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/t.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/t.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,3 @@
+<? xml version="1.0" ?>
+<test>hello<foo/></test>
+

Added: webservices/axis2/trunk/c/modules/test/om/src/testNamespaces.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/testNamespaces.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/testNamespaces.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/testNamespaces.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,22 @@
+<Template> 
+  <Application1 xmlns:xplt="http://www.xxxx.com/"
+                xmlns:xpl="http://www.xxxx.com/"
+                version="3.0"
+                randomAttribute="foo"
+  >
+    <xpl:insertText/> 
+    <xplt:anyElement> 
+      <Name/> 
+    </xplt:anyElement> 
+  </Application1> 
+
+  <Application2 xmlns:xplt="http://www.xxxx.com/"
+                xmlns:xpl="http://www.xxxx.com/"
+                version="3.0"
+  > 
+    <xpl:insertText/> 
+    <xplt:anyElement> 
+      <Name/> 
+    </xplt:anyElement> 
+  </Application2> 
+</Template>

Modified: webservices/axis2/trunk/c/modules/test/om/src/test_om.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/test_om.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/test_om.c (original)
+++ webservices/axis2/trunk/c/modules/test/om/src/test_om.c Sun Nov 20 19:53:26 2005
@@ -12,7 +12,7 @@
 
 
 int
-test_om_build (char *file_name)
+test_om_build (char *filename)
 {
     axis2_om_element_t *ele1 = NULL, *ele2 = NULL, *ele3 = NULL, *ele4 = NULL;
     axis2_om_stax_builder_t *builder = NULL;
@@ -22,12 +22,11 @@
     FILE *fp = NULL;
     axis2_om_output_t *om_output = NULL;
     axis2_om_namespace_t* ns = NULL;
-    axis2_xml_writer_t *xml_writer = NULL;
 
-    fp = fopen (file_name, "r");
+
   
    
-    builder = axis2_om_stax_builder_create (&environment,fp);
+    builder = axis2_om_stax_builder_create_for_file (&environment, filename);
            
     document = axis2_om_document_create (&environment, NULL, builder);
     node1 = AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT (document,&environment);
@@ -84,11 +83,15 @@
     printf ("Serialize pulled document\n");
     
     om_output = axis2_om_output_create (&environment, NULL);
-    AXIS2_OM_NODE_SERIALIZE (node1, &environment , om_output);
+    AXIS2_OM_NODE_SERIALIZE (AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(document, &environment), &environment , om_output);
+    AXIS2_OM_DOCUMENT_FREE(document, &environment); 
+    axis2_om_output_free(om_output, &environment);
+    AXIS2_OM_STAX_BUILDER_FREE(builder, &environment); 
     
-    AXIS2_FREE (environment->allocator, om_output);
+
     
     printf ("\ndone\n");
+    return ;
 }
 
 
@@ -96,7 +99,7 @@
 int
 test_om_serialize ()
 {
-    printf ("START: build document\n");
+
     /*
        <book xmlns:axiomc="http://ws.apache.org/axis2/c/om" xmlns:isbn="urn:ISBN:0-395-74341-6">
        <title>Axis2/C OM HOWTO</title>
@@ -109,6 +112,7 @@
        </notes>
        </book>
     */
+    int status;
     axis2_om_element_t *ele1 = NULL, *ele2 = NULL, *ele3 = NULL, *ele4 =
         NULL, *ele5 = NULL;
     axis2_om_node_t *node1 = NULL, *node2 = NULL, *node3 = NULL, *node4 =
@@ -154,7 +158,7 @@
     om_output = axis2_om_output_create (&environment, NULL);
 
     printf ("Serialize built document\n");
-    int status = AXIS2_OM_NODE_SERIALIZE (node1,&environment ,om_output);
+    status = AXIS2_OM_NODE_SERIALIZE (node1,&environment ,om_output);
     if (status != AXIS2_SUCCESS)
     {
         printf ("\naxis2_om_node_serialize failed\n");
@@ -165,7 +169,7 @@
     /* end serializing stuff */
 
      AXIS2_OM_NODE_FREE_TREE(node1,&environment);
-     AXIS2_FREE(environment->allocator,om_output);
+     axis2_om_output_free(om_output, &environment);
      printf ("\nDONE\n");
 
     return 0;
@@ -181,7 +185,7 @@
     environment = axis2_env_create (allocator);
 
     test_om_build (file_name);
-    test_om_serialize ();    
-    
-    
-}
+    test_om_serialize ();  
+
+    axis2_env_free(environment);    
+ }

Added: webservices/axis2/trunk/c/modules/test/om/src/text.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/text.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/text.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/text.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,10 @@
+<?xml version="1.0"?>
+<foo>
+	<bar>
+		baz
+		<cheese id="3"/>
+		baz
+		<cheese/>
+		baz
+	</bar>
+</foo>

Added: webservices/axis2/trunk/c/modules/test/om/src/underscore.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/underscore.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/underscore.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/underscore.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<root a="1" _a="2">
+  <b>1</b>
+  <_b>2</_b>
+</root>
+  

Added: webservices/axis2/trunk/c/modules/test/om/src/web.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/web.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/web.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/web.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<web-app>
+  <servlet>
+    <servlet-name>snoop</servlet-name>
+    <servlet-class>SnoopServlet</servlet-class>
+  </servlet>
+  <servlet>
+    <servlet-name>file</servlet-name>
+    <servlet-class>ViewFile</servlet-class>
+    <init-param>
+      <param-name>initial</param-name>
+      <param-value>
+        1000
+      </param-value>
+      <description>
+        The initial value for the counter  <!-- optional -->
+      </description>
+    </init-param>
+  </servlet>
+  <servlet-mapping>
+    <servlet-name>
+      mv
+    </servlet-name>
+    <url-pattern>
+      *.wm
+    </url-pattern>
+  </servlet-mapping>
+
+  <distributed/>
+
+  <security-role>
+    <role-name>
+     manager
+    </role-name>
+    <role-name>
+     director
+    </role-name>
+    <role-name>
+     president
+    </role-name>
+  </security-role>
+</web-app>

Added: webservices/axis2/trunk/c/modules/test/om/src/web2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/test/om/src/web2.xml?rev=345821&view=auto
==============================================================================
--- webservices/axis2/trunk/c/modules/test/om/src/web2.xml (added)
+++ webservices/axis2/trunk/c/modules/test/om/src/web2.xml Sun Nov 20 19:53:26 2005
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<root>
+  <b>
+    <d />
+  </b>
+  <c />
+</root>

Modified: webservices/axis2/trunk/c/modules/util/src/axis2_string.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/axis2_string.h?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/axis2_string.h (original)
+++ webservices/axis2/trunk/c/modules/util/src/axis2_string.h Sun Nov 20 19:53:26 2005
@@ -32,10 +32,10 @@
  * @{
  */
 
-    void* 
+    AXIS2_DECLARE(void*)
     axis2_strdup (const void *ptr, axis2_env_t **env);
 
-    int 
+    AXIS2_DECLARE(int)
     axis2_strcmp (const axis2_char_t * s1, const axis2_char_t * s2);
 
 #define AXIS2_STRDUP(pts, env) axis2_strdup(pts, env)

Modified: webservices/axis2/trunk/c/modules/util/src/env.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/env.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/env.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/env.c Sun Nov 20 19:53:26 2005
@@ -15,12 +15,12 @@
  */
 
 #include <stdlib.h>
-
+#include <string.h>
 #include <axis2_env.h>
 #include <axis2_error_default.h>
 #include <axis2_string.h>
 
-axis2_status_t AXIS2_CALL axis2_env_free (axis2_env_t *env)
+AXIS2_DECLARE(axis2_status_t)  axis2_env_free (axis2_env_t *env)
 {
     if(NULL != env && NULL != env->allocator)
         free (env->allocator);
@@ -40,7 +40,7 @@
 	return 0;  
 }
 
-axis2_env_t* AXIS2_CALL
+AXIS2_DECLARE(axis2_env_t*)
 axis2_env_create (axis2_allocator_t *allocator)
 {
 	axis2_env_t *environment;
@@ -64,7 +64,7 @@
     
 }
 
-axis2_env_t* AXIS2_CALL
+AXIS2_DECLARE(axis2_env_t*)
 axis2_env_create_with_error_stream (axis2_allocator_t *allocator
                           , axis2_error_t *error, axis2_stream_t *stream)
 {
@@ -72,7 +72,7 @@
 		, stream, NULL);    
 }
 
-axis2_env_t * AXIS2_CALL
+AXIS2_DECLARE(axis2_env_t *)
 axis2_env_create_with_error_stream_log (axis2_allocator_t *allocator
                           , axis2_error_t *error, axis2_stream_t *stream
                           , axis2_log_t *log)
@@ -107,7 +107,7 @@
 }
 
 
-axis2_status_t AXIS2_CALL
+AXIS2_DECLARE( axis2_status_t )
 axis2_env_check_status (axis2_env_t **env)
 {
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
@@ -115,7 +115,7 @@
 	return AXIS2_ERROR_GET_STATUS_CODE((*env)->error);
 }
 
-axis2_status_t AXIS2_CALL axis2_env_enable_log (axis2_env_t **env, axis2_bool_t enable)
+AXIS2_DECLARE(axis2_status_t) axis2_env_enable_log (axis2_env_t **env, axis2_bool_t enable)
 {
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
 
@@ -124,7 +124,7 @@
     return AXIS2_SUCCESS;
 }
 
-axis2_status_t AXIS2_CALL axis2_env_write_log (axis2_env_t **env, const char* message)
+AXIS2_DECLARE(axis2_status_t)  axis2_env_write_log (axis2_env_t **env, const char* message)
 {
     AXIS2_ENV_CHECK(env, AXIS2_CRTICAL_FAILURE);
 

Modified: webservices/axis2/trunk/c/modules/util/src/error.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/error.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/error.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/error.c Sun Nov 20 19:53:26 2005
@@ -71,7 +71,7 @@
 	error->ops->set_error_number = axis2_error_impl_set_error_number;
 	error->ops->set_status_code = axis2_error_impl_set_status_code;
 	error->ops->get_status_code = axis2_error_impl_get_status_code;
-
+    error->ops->free            = axis2_error_impl_free;
 
     return error;
 }

Modified: webservices/axis2/trunk/c/modules/util/src/linked_list.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/linked_list.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/linked_list.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/linked_list.c Sun Nov 20 19:53:26 2005
@@ -200,7 +200,7 @@
     linked_list_impl = AXIS2_MALLOC( (*env)->allocator, sizeof(axis2_linked_list_impl_t) );
     if (!linked_list_impl)
     { 
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
         return NULL;        
     }
     
@@ -210,7 +210,7 @@
         sizeof(axis2_linked_list_ops_t) );
     if (!linked_list_impl->linked_list.ops)
     {
-        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, AXIS2_FAILURE);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
         axis2_linked_list_free(&(linked_list_impl->linked_list), env);
         return NULL;        
     }
@@ -507,6 +507,7 @@
 axis2_linked_list_remove_first(axis2_linked_list_t *linked_list,
                                 axis2_env_t **env)
 {
+    void *r;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, NULL);
     
     if (AXIS2_INTF_TO_IMPL(linked_list)->size == 0)
@@ -514,7 +515,7 @@
     
     AXIS2_INTF_TO_IMPL(linked_list)->mod_count++;
     AXIS2_INTF_TO_IMPL(linked_list)->size--;
-    void *r = AXIS2_INTF_TO_IMPL(linked_list)->first->data;
+    r = AXIS2_INTF_TO_IMPL(linked_list)->first->data;
     
     if (AXIS2_INTF_TO_IMPL(linked_list)->first->next != NULL)
         AXIS2_INTF_TO_IMPL(linked_list)->first->next->previous = NULL;
@@ -567,10 +568,11 @@
                             axis2_env_t **env,
                             void *o)
 {
+    entry_t *e ;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FAILURE);
     
-    entry_t *e = create_entry(env, o);
+    e = create_entry(env, o);
     
     AXIS2_INTF_TO_IMPL(linked_list)->mod_count++;
     if (AXIS2_INTF_TO_IMPL(linked_list)->size == 0)
@@ -596,11 +598,12 @@
 axis2_linked_list_add_last(axis2_linked_list_t *linked_list,
                             axis2_env_t **env,
                             void *o)
-{
+{   
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FAILURE);
     
-    entry_t *e = create_entry(env, o);
+    e = create_entry(env, o);
     return add_last_entry(linked_list, env, e);
 }
 
@@ -616,10 +619,11 @@
                             axis2_env_t **env,
                             void *o)
 {
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FALSE);
     
-    entry_t *e = AXIS2_INTF_TO_IMPL(linked_list)->first;
+    e = AXIS2_INTF_TO_IMPL(linked_list)->first;
     while (e != NULL)
     {
         if (o == e->data)
@@ -652,10 +656,11 @@
 axis2_linked_list_add(axis2_linked_list_t *linked_list, 
                         axis2_env_t **env,
                         void *o)
-{
+{   
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FALSE);
-    entry_t *e = create_entry(env, o);
+    e = create_entry(env, o);
     return add_last_entry(linked_list, env, e);
 }
 
@@ -671,10 +676,11 @@
                             axis2_env_t **env,
                             void *o)
 {
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FALSE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FALSE);
     
-    entry_t *e = AXIS2_INTF_TO_IMPL(linked_list)->first;
+    e = AXIS2_INTF_TO_IMPL(linked_list)->first;
     while (e != NULL)
     {
         if(o == e->data)
@@ -735,11 +741,13 @@
                         axis2_env_t **env,
                         int index, void *o)
 {
+    entry_t *e;
+    void *old;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, NULL);
     AXIS2_PARAM_CHECK((*env)->error, o, NULL);
     axis2_linked_list_check_bounds_exclusive(linked_list, env, index);
-    entry_t *e = axis2_linked_list_get_entry(linked_list, env, index);
-    void *old = e->data;
+    e = axis2_linked_list_get_entry(linked_list, env, index);
+    old = e->data;
     e->data = o;
     return old;
 }
@@ -757,11 +765,12 @@
                                 void *o)
 {
     entry_t *after = NULL;
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FAILURE);
     
     axis2_linked_list_check_bounds_inclusive(linked_list, env, index);
-    entry_t *e = create_entry(env, o);
+    e = create_entry(env, o);
     
     if (index < AXIS2_INTF_TO_IMPL(linked_list)->size)
     {
@@ -794,9 +803,10 @@
                                     axis2_env_t **env,
                                     int index)
 {
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, NULL);
     axis2_linked_list_check_bounds_exclusive(linked_list, env, index);
-    entry_t *e = axis2_linked_list_get_entry(linked_list, env, index);
+    e = axis2_linked_list_get_entry(linked_list, env, index);
     axis2_linked_list_remove_entry(linked_list, env, e);
     return e->data;
 }
@@ -812,10 +822,12 @@
                             axis2_env_t **env,
                             void *o)
 {
+    int index = 0;
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FAILURE);
-    int index = 0;
-    entry_t *e = AXIS2_INTF_TO_IMPL(linked_list)->first;
+    
+    e = AXIS2_INTF_TO_IMPL(linked_list)->first;
     while (e != NULL)
     {
     if (o == e->data)
@@ -837,11 +849,13 @@
                                 axis2_env_t **env,
                                 void *o)
 {
+    int index;
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, o, AXIS2_FAILURE);
     
-    int index = AXIS2_INTF_TO_IMPL(linked_list)->size - 1;
-    entry_t *e = AXIS2_INTF_TO_IMPL(linked_list)->last;
+    index = AXIS2_INTF_TO_IMPL(linked_list)->size - 1;
+    e = AXIS2_INTF_TO_IMPL(linked_list)->last;
     while (e != NULL)
     {
         if (o == e->data)
@@ -862,10 +876,12 @@
                             axis2_env_t **env)
 {
     int i = 0;
+    void **array;
+    entry_t *e;
     AXIS2_FUNC_PARAM_CHECK(linked_list, env, NULL);
-    void **array = (void **) AXIS2_MALLOC((*env)->allocator, 
+    array = (void **) AXIS2_MALLOC((*env)->allocator, 
         AXIS2_INTF_TO_IMPL(linked_list)->size * sizeof(void *));
-    entry_t *e = AXIS2_INTF_TO_IMPL(linked_list)->first;
+    e = AXIS2_INTF_TO_IMPL(linked_list)->first;
     for (i = 0; i < AXIS2_INTF_TO_IMPL(linked_list)->size; i++)
     {
         array[i] = e->data;

Modified: webservices/axis2/trunk/c/modules/util/src/string.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/util/src/string.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/util/src/string.c (original)
+++ webservices/axis2/trunk/c/modules/util/src/string.c Sun Nov 20 19:53:26 2005
@@ -18,8 +18,9 @@
 #include <stdlib.h>
 #include <string.h>
 #include <axis2.h>
+#include <axis2_defines.h>
 
-void* AXIS2_CALL
+AXIS2_DECLARE(void*)
 axis2_strdup (const void *ptr, axis2_env_t **env)
 {
     AXIS2_FUNC_PARAM_CHECK(ptr, env, NULL);
@@ -41,7 +42,7 @@
     }
 }
 
-int AXIS2_CALL
+AXIS2_DECLARE(int)
 axis2_strcmp (const axis2_char_t * s1, const axis2_char_t * s2)
 {
     if (s1 && s2)

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_attribute.c Sun Nov 20 19:53:26 2005
@@ -74,12 +74,12 @@
 
 }axis2_om_attribute_impl_t;
 
-/***************************************** macro ***********************************/
+/***************************************** macro *******************************/
 
 #define AXIS2_INTF_TO_IMPL(om_attr) ((axis2_om_attribute_impl_t*)om_attr)
 
 
-/*************************************** *******************************************/
+/*************************************** ***************************************/
 
 AXIS2_DECLARE(axis2_om_attribute_t*)
 axis2_om_attribute_create (axis2_env_t **env,
@@ -92,7 +92,8 @@
     AXIS2_ENV_CHECK(env, NULL);
     if (!localname)
     {   /* localname is mandatory */
-        AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error, AXIS2_ERROR_INVALID_NULL_PARAM);
+        AXIS2_ERROR_SET_ERROR_NUMBER((*env)->error,
+                    AXIS2_ERROR_INVALID_NULL_PARAM);
         AXIS2_ERROR_SET_STATUS_CODE((*env)->error, AXIS2_FAILURE);
         return NULL;
     }
@@ -189,14 +190,14 @@
         axis2_om_namespace_t *ns = NULL;
         ns = AXIS2_INTF_TO_IMPL(om_attribute)->ns;
         
-        qname =
-            axis2_qname_create (env, AXIS2_INTF_TO_IMPL(om_attribute)->localname,
-                                AXIS2_OM_NAMESPACE_GET_URI(ns, env),AXIS2_OM_NAMESPACE_GET_PREFIX(ns, env));
+        qname = axis2_qname_create (env,
+                    AXIS2_INTF_TO_IMPL(om_attribute)->localname,
+                    AXIS2_OM_NAMESPACE_GET_URI(ns, env),
+                    AXIS2_OM_NAMESPACE_GET_PREFIX(ns, env));
     }                                
     else
-        qname =
-            axis2_qname_create (env,AXIS2_INTF_TO_IMPL(om_attribute)->localname, NULL,
-                                NULL);
+        qname = axis2_qname_create (env,AXIS2_INTF_TO_IMPL(om_attribute)->localname,
+                                    NULL,  NULL);
 
     return qname;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_comment.c Sun Nov 20 19:53:26 2005
@@ -28,6 +28,11 @@
 axis2_om_comment_set_value(axis2_om_comment_t *om_comment,
                            axis2_env_t **env,
                            const axis2_char_t *value);
+
+axis2_status_t AXIS2_CALL
+axis2_om_comment_serialize(axis2_om_comment_t *om_comment,
+                           axis2_env_t **env,
+                           axis2_om_output_t *om_output);
                                                                              
 /***************************** axis2_om_comment_struct ******************/
 
@@ -47,6 +52,7 @@
 
 AXIS2_DECLARE(axis2_om_comment_t*)
 axis2_om_comment_create(axis2_env_t **env,
+                        axis2_om_node_t *parent,
                         const axis2_char_t * value,
                         axis2_om_node_t ** node)
 {
@@ -85,6 +91,12 @@
 
     AXIS2_OM_NODE_SET_DATA_ELEMENT((*node), env, comment);
     AXIS2_OM_NODE_SET_NODE_TYPE((*node), env, AXIS2_OM_COMMENT);
+    
+    if (parent)
+    {
+        AXIS2_OM_NODE_SET_PARENT((*node), env, parent);
+        AXIS2_OM_NODE_ADD_CHILD((*node), env, parent); 
+    }
 
     /* operations */
     comment->om_comment.ops = NULL;
@@ -140,4 +152,21 @@
     AXIS2_PARAM_CHECK((*env)->error, value, AXIS2_FAILURE);
     AXIS2_INTF_TO_IMPL(om_comment)->value = (axis2_char_t*)AXIS2_STRDUP(value,env);
     return AXIS2_SUCCESS;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_om_comment_serialize(axis2_om_comment_t *om_comment,
+                           axis2_env_t **env,
+                           axis2_om_output_t *om_output)
+{
+    axis2_om_comment_impl_t *comment_impl;
+    
+    AXIS2_FUNC_PARAM_CHECK(om_comment, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, om_output, AXIS2_FAILURE);    
+    
+    comment_impl = AXIS2_INTF_TO_IMPL(om_comment);
+    if(comment_impl->value)
+        return  axis2_om_output_write(om_output, env,
+                    AXIS2_OM_COMMENT , 1 , comment_impl->value);
+    return AXIS2_FAILURE;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_doctype.c Sun Nov 20 19:53:26 2005
@@ -28,7 +28,12 @@
 
 axis2_char_t* AXIS2_CALL
 axis2_om_doctype_get_value(axis2_om_doctype_t *om_doctype,
-                           axis2_env_t **env);                                                  
+                           axis2_env_t **env);      
+
+axis2_status_t AXIS2_CALL
+axis2_om_doctype_serialize(axis2_om_doctype_t *om_doctype,
+                           axis2_env_t **env,
+                           axis2_om_output_t *om_output);
                        
 /************************ axis2_om_doctype struct *********************/
 
@@ -147,4 +152,21 @@
 {
     AXIS2_FUNC_PARAM_CHECK(om_doctype, env, NULL);
     return AXIS2_INTF_TO_IMPL(om_doctype)->value;
+}
+
+axis2_status_t AXIS2_CALL
+axis2_om_doctype_serialize(axis2_om_doctype_t *om_doctype,
+                           axis2_env_t **env,
+                           axis2_om_output_t *om_output)
+{
+    axis2_om_doctype_impl_t *doctype_impl;
+    AXIS2_FUNC_PARAM_CHECK(om_doctype, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, om_output, AXIS2_FAILURE);
+    
+    doctype_impl = AXIS2_INTF_TO_IMPL(om_doctype);
+    if(doctype_impl->value)
+        return  axis2_om_output_write(om_output, env,
+                    AXIS2_OM_DOCTYPE, 1, doctype_impl->value);
+    
+    return AXIS2_FAILURE;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_element.c Sun Nov 20 19:53:26 2005
@@ -532,29 +532,46 @@
         }
         if (AXIS2_INTF_TO_IMPL(om_element)->attributes)
         {
-            axis2_hash_free (AXIS2_INTF_TO_IMPL(om_element)->attributes, env);
+            axis2_hash_index_t *hi;
+            void *val = NULL;
+            /*
+            for (hi = axis2_hash_first (AXIS2_INTF_TO_IMPL(om_element)->attributes, env); hi;
+                 hi = axis2_hash_next ( env, hi))
+            {
+               axis2_hash_this (hi, NULL, NULL, &val);
 
-            /* TODO: free attributes */
-            /*need to iterate and free individual attributes */
+                   if (val)
+                   status = AXIS2_OM_ATTRIBUTE_FREE ((axis2_om_attribute_t *)val, env);
+                   else
+                   {
+                   status = AXIS2_FAILURE;
+                   }
+                   val = NULL;
+                   
+            }
+            */
+           axis2_hash_free (AXIS2_INTF_TO_IMPL(om_element)->attributes, env);
         }
         if (AXIS2_INTF_TO_IMPL(om_element)->namespaces)
         {
             axis2_hash_index_t *hi;
             void *val = NULL;
+            /*
             for (hi = axis2_hash_first (AXIS2_INTF_TO_IMPL(om_element)->namespaces, env); hi;
                  hi = axis2_hash_next ( env, hi))
             {
-            /*   axis2_hash_this (hi, NULL, NULL, &val);
+               axis2_hash_this (hi, NULL, NULL, &val);
 
-                      if (val)
-                   status = axis2_om_namespace_free (environment, (axis2_om_namespace_t *)val);
+                   if (val)
+                   status = AXIS2_OM_NAMESPACE_FREE ((axis2_om_namespace_t *)val, env);
                    else
                    {
                    status = AXIS2_FAILURE;
                    }
                    val = NULL;
-                */
+                   
             }
+            */
             axis2_hash_free (AXIS2_INTF_TO_IMPL(om_element)->namespaces, env);
             /*TODO: free namespaces */
            /* need to iterate and free individual namespaces */

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_node.c Sun Nov 20 19:53:26 2005
@@ -17,6 +17,10 @@
 #include <axis2_om_node.h>
 #include <axis2_om_element.h>
 #include <axis2_om_text.h>
+#include <axis2_om_comment.h>
+#include <axis2_om_processing_instruction.h>
+#include <axis2_om_doctype.h>
+
 
 /*************************** function prototypes ******************************************/
 
@@ -253,7 +257,9 @@
         {
             
             child_node = AXIS2_OM_NODE_DETACH (AXIS2_INTF_TO_IMPL(om_node)->first_child, env);
-            AXIS2_OM_NODE_FREE_TREE ( child_node , env);
+            
+            AXIS2_OM_NODE_FREE_TREE ( child_node , env); 
+            
         }
     }
     
@@ -464,7 +470,8 @@
     else
     {
         axis2_om_node_t *prev_sibling = AXIS2_INTF_TO_IMPL(om_node)->prev_sibling;
-        AXIS2_INTF_TO_IMPL(prev_sibling)->next_sibling = node_to_insert;
+        if(prev_sibling)
+            AXIS2_INTF_TO_IMPL(prev_sibling)->next_sibling = node_to_insert;
     }
     AXIS2_INTF_TO_IMPL(om_node)->prev_sibling = node_to_insert;
     return AXIS2_SUCCESS;
@@ -495,11 +502,35 @@
     case AXIS2_OM_TEXT:
         status = AXIS2_OM_TEXT_SERIALIZE (
                 (axis2_om_text_t*)(AXIS2_INTF_TO_IMPL(om_node)->data_element),
-                env,
-                om_output);
-        return status;
+                env, om_output);
+        if(status != AXIS2_SUCCESS)
+            return status;
         break;
+    case AXIS2_OM_COMMENT:
+        status = AXIS2_OM_COMMENT_SERIALIZE(
+                (axis2_om_comment_t*)(AXIS2_INTF_TO_IMPL(om_node)->data_element),
+                env, om_output);
+        if( status != AXIS2_SUCCESS)
+            return status;
+        
+        break;    
     
+    case AXIS2_OM_DOCTYPE:
+        status = AXIS2_OM_DOCTYPE_SERIALIZE(        
+                (axis2_om_doctype_t*)(AXIS2_INTF_TO_IMPL(om_node)->data_element),
+                 env, om_output);
+        if( status != AXIS2_SUCCESS)
+            return status;
+        break;
+        
+    case AXIS2_OM_PROCESSING_INSTRUCTION:
+        status = AXIS2_OM_PROCESSING_INSTRUCTION_SERIALIZE(
+                (axis2_om_processing_instruction_t*)
+                    (AXIS2_INTF_TO_IMPL(om_node)->data_element), env, om_output);
+        if( status != AXIS2_SUCCESS)
+            return status;
+        break;
+        
     default:
         break;
     }
@@ -512,7 +543,7 @@
     {
     case AXIS2_OM_ELEMENT:
         status = AXIS2_OM_ELEMENT_SERIALIZE_END_PART ((axis2_om_element_t *)
-                                    (AXIS2_INTF_TO_IMPL(om_node)->data_element),
+                                   (AXIS2_INTF_TO_IMPL(om_node)->data_element),
                                     env, om_output);
         if (status != AXIS2_SUCCESS)
             return status;

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_output.c Sun Nov 20 19:53:26 2005
@@ -16,7 +16,6 @@
 
 #include <axis2_om_output.h>
 #include <stdarg.h>
-#include <guththila_xml_stream_writer.h>
 #include <axis2_xml_writer.h>
 
 #define   DEFAULT_CHAR_SET_ENCODING  "utf-8"
@@ -132,6 +131,7 @@
                                                       args_list[1],
                                                       args_list[2],
                                                       args_list[3]);
+        
          break;
 
         }
@@ -146,6 +146,29 @@
         status = AXIS2_XML_WRITER_WRITE_CHARACTERS(om_output->xml_writer, env,
                                                   args_list[0]);
         break;
+    case AXIS2_OM_COMMENT:
+        status = AXIS2_XML_WRITER_WRITE_COMMENT(om_output->xml_writer, env,
+                                                args_list[0]);
+        break;
+    case AXIS2_OM_PROCESSING_INSTRUCTION:
+        switch(no_of_args)
+        {
+         case 1:
+            
+            status = AXIS2_XML_WRITER_WRITE_PROCESSING_INSTRUCTION(
+                        om_output->xml_writer, env, args_list[0]);
+            break;
+         case 2:
+             
+            status = AXIS2_XML_WRITER_WRITE_PROCESSING_INSTRUCTION_DATA(
+                        om_output->xml_writer, env, args_list[0], args_list[1]);        
+            break;
+        }
+         break;
+    case AXIS2_OM_DOCTYPE:
+        status = AXIS2_XML_WRITER_WRITE_DTD(om_output->xml_writer, 
+                                            env, args_list[0]);
+        break;
     
     default:
         break;
@@ -157,4 +180,18 @@
     }
     else
         return AXIS2_FAILURE;
+}
+
+
+ AXIS2_DECLARE(axis2_status_t)
+ axis2_om_output_free(axis2_om_output_t *om_output,
+                         axis2_env_t **env)
+{
+    AXIS2_FUNC_PARAM_CHECK(om_output, env, AXIS2_FAILURE);
+    if(om_output->xml_version)
+        AXIS2_FREE((*env)->allocator, om_output->xml_version);
+    if(om_output->char_set_encoding)
+        AXIS2_FREE((*env)->allocator, om_output->char_set_encoding);
+    AXIS2_FREE ((*env)->allocator, om_output);
+    return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_processing_instruction.c Sun Nov 20 19:53:26 2005
@@ -36,6 +36,12 @@
 axis2_char_t*  AXIS2_CALL
 axis2_om_processing_instruction_get_target(axis2_om_processing_instruction_t *om_pi,
                                            axis2_env_t **env);
+                                           
+axis2_status_t AXIS2_CALL
+axis2_om_processing_instruction_serialize
+                                (axis2_om_processing_instruction_t *om_pi,
+                                 axis2_env_t **env,
+                                 axis2_om_output_t *om_output);                                 
 
 /*********************** axis2_om_processing_instruction_impl_t struct ********/
 typedef struct axis2_om_processing_instruction_impl
@@ -199,4 +205,29 @@
 {
     AXIS2_FUNC_PARAM_CHECK(om_pi, env, NULL);
     return AXIS2_INTF_TO_IMPL(om_pi)->target;
+}
+
+
+axis2_status_t AXIS2_CALL
+axis2_om_processing_instruction_serialize
+                                (axis2_om_processing_instruction_t *om_pi,
+                                 axis2_env_t **env,
+                                 axis2_om_output_t *om_output)
+{
+    axis2_om_processing_instruction_impl_t *om_pi_impl;
+    AXIS2_FUNC_PARAM_CHECK(om_pi, env, AXIS2_FAILURE);
+    AXIS2_PARAM_CHECK((*env)->error, om_output, AXIS2_FAILURE);
+        
+    om_pi_impl = AXIS2_INTF_TO_IMPL(om_pi);
+    
+    if(om_pi_impl->target && om_pi_impl->value)
+        return axis2_om_output_write(om_output, env, 
+                                     AXIS2_OM_PROCESSING_INSTRUCTION,
+                                     2, om_pi_impl->target, om_pi_impl->value); 
+    
+    else if(om_pi_impl->target)
+        return axis2_om_output_write(om_output, env, 
+                                     AXIS2_OM_PROCESSING_INSTRUCTION,
+                                     2, om_pi_impl->target, om_pi_impl->value);
+    return AXIS2_FAILURE;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_stax_builder.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_stax_builder.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_stax_builder.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_stax_builder.c Sun Nov 20 19:53:26 2005
@@ -17,8 +17,11 @@
 #include <axis2_om_stax_builder.h>
 #include <axis2_om_element.h>
 #include <axis2_om_text.h>
+#include <axis2_om_processing_instruction.h>
+#include <axis2_om_comment.h>
 #include <axis2_string.h>
 #include <axis2_pull_parser.h>
+#include <axis2_om_doctype.h>
 
 
 
@@ -84,9 +87,69 @@
 
 #define AXIS2_INTF_TO_IMPL(builder) ((axis2_om_stax_builder_impl_t*)builder)
 
-/******************************************************************************/													
-axis2_om_stax_builder_t *AXIS2_CALL 
-axis2_om_stax_builder_create (axis2_env_t **env,void* stream)
+/******************************************************************************/
+
+													
+AXIS2_DECLARE(axis2_om_stax_builder_t *)
+axis2_om_stax_builder_create_for_file (axis2_env_t **env,char* filename)
+{
+    axis2_om_stax_builder_impl_t *builder = NULL;
+    AXIS2_ENV_CHECK(env, NULL);
+    
+    builder = (axis2_om_stax_builder_impl_t *)AXIS2_MALLOC (
+                (*env)->allocator, sizeof(axis2_om_stax_builder_impl_t));
+
+    if (!builder)
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    
+    
+   
+    builder->cache = AXIS2_TRUE;
+    builder->parser_accessed = AXIS2_FALSE;
+    builder->done = AXIS2_FALSE;
+    builder->lastnode = NULL;
+    builder->document = NULL;
+
+    builder->parser = axis2_pull_parser_create_for_file(env,filename);
+    if(!builder->parser)
+    {
+        AXIS2_FREE((*env)->allocator, builder);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+    
+    
+    /* operations */
+    builder->om_stax_builder.ops = NULL;
+    builder->om_stax_builder.ops = (axis2_om_stax_builder_ops_t *) AXIS2_MALLOC(
+                                    (*env)->allocator, sizeof(axis2_om_stax_builder_ops_t));
+
+    if (!builder->om_stax_builder.ops)
+    {
+        AXIS2_PULL_PARSER_FREE (builder->parser, env);
+        AXIS2_FREE ((*env)->allocator, builder);
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_NO_MEMORY, NULL);
+    }
+
+    builder->om_stax_builder.ops->next = axis2_om_stax_builder_next;
+    builder->om_stax_builder.ops->discard_current_element = 
+        axis2_om_stax_builder_discard_current_element;
+        
+	builder->om_stax_builder.ops->free = axis2_om_stax_builder_free;
+	builder->om_stax_builder.ops->set_document = axis2_om_stax_builder_set_document;
+	builder->om_stax_builder.ops->set_lastnode = axis2_om_stax_builder_set_lastnode;
+	builder->om_stax_builder.ops->get_lastnode = axis2_om_stax_builder_get_lastnode;
+	
+    return &(builder->om_stax_builder);
+}
+
+/*********************** for memory ******************************************/
+
+AXIS2_DECLARE(axis2_om_stax_builder_t *)
+axis2_om_stax_builder_create_for_memory (axis2_env_t **env,
+                                        int (*read_input_callback)(char *buffer,int size),
+                                        void (*close_input_callback)(void))
+
+
 {
     axis2_om_stax_builder_impl_t *builder = NULL;
     AXIS2_ENV_CHECK(env, NULL);
@@ -105,7 +168,8 @@
     builder->lastnode = NULL;
     builder->document = NULL;
 
-    builder->parser = axis2_pull_parser_create(env,stream);
+    builder->parser = axis2_pull_parser_create_for_memory(env,
+                             read_input_callback, close_input_callback );
     if(!builder->parser)
     {
         AXIS2_FREE((*env)->allocator, builder);
@@ -137,6 +201,8 @@
     return &(builder->om_stax_builder);
 }
 
+
+
 axis2_status_t
 axis2_om_stax_builder_process_attributes (axis2_om_stax_builder_t *om_builder,
                                           axis2_env_t **env,
@@ -148,25 +214,28 @@
     axis2_om_namespace_t *ns = NULL;
     axis2_char_t *uri = NULL;
     axis2_char_t *prefix = NULL;
-    axis2_om_stax_builder_impl_t *builder = NULL;
+    axis2_char_t *attr_name = NULL;
+    axis2_char_t *attr_value = NULL;
+    
+    axis2_om_stax_builder_impl_t *builder_impl = NULL;
     axis2_status_t status = AXIS2_SUCCESS;
     
     AXIS2_FUNC_PARAM_CHECK(om_builder, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error, element_node, AXIS2_FAILURE);
-    builder = AXIS2_INTF_TO_IMPL(om_builder);
+    builder_impl = AXIS2_INTF_TO_IMPL(om_builder);
     
 
     attribute_count = AXIS2_PULL_PARSER_GET_ATTRIBUTE_COUNT(
-                               builder->parser,env);
+                               builder_impl->parser,env);
     
     for (i=1; i <= attribute_count ; i++)
     {
         
         uri =  AXIS2_PULL_PARSER_GET_ATTRIBUTE_NAMESPACE_BY_NUMBER(
-                       builder->parser, env, i);
+                       builder_impl->parser, env, i);
               
         prefix = AXIS2_PULL_PARSER_GET_ATTRIBUTE_PREFIX_BY_NUMBER(
-                        builder->parser, env, i);
+                        builder_impl->parser, env, i);
 
         if (uri)
         {
@@ -177,7 +246,7 @@
                         env , element_node, uri, prefix);
             }
         }
-
+        /*
         if (ns == NULL && prefix && uri
             && (axis2_strcmp (prefix, XMLNS_PREFIX) == 0)
             && (axis2_strcmp (uri, XMLNS_URI) == 0))
@@ -199,17 +268,24 @@
                     (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(element_node,env),
                     env, element_node, uri, prefix);
         }
-        attribute = axis2_om_attribute_create (
-                            env,
-                            AXIS2_PULL_PARSER_GET_ATTRIBUTE_NAME_BY_NUMBER(
-                                 builder->parser, env, i),
-                            AXIS2_PULL_PARSER_GET_ATTRIBUTE_VALUE_BY_NUMBER(
-                                 builder->parser, env, i), ns);
+        */
+        attr_name = AXIS2_PULL_PARSER_GET_ATTRIBUTE_NAME_BY_NUMBER(
+                                 builder_impl->parser, env, i);
+        
+        attr_value = AXIS2_PULL_PARSER_GET_ATTRIBUTE_VALUE_BY_NUMBER(
+                                 builder_impl->parser, env, i);
+        
+        attribute = axis2_om_attribute_create (env, attr_name, attr_value, ns);
                             
         status = AXIS2_OM_ELEMENT_ADD_ATTRIBUTE (
-                        (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(element_node,env),
+                    (axis2_om_element_t*)AXIS2_OM_NODE_GET_DATA_ELEMENT(element_node,env),
                         env, attribute);
-
+        
+        AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser, env, uri);
+        AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser, env, prefix);
+        AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser, env, attr_name);
+        AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser, env, attr_value);
+        
     }
 
     return status;
@@ -221,7 +297,6 @@
 axis2_om_stax_builder_create_om_text (axis2_om_stax_builder_t * om_stax_builder,
                                       axis2_env_t **env)
 {
-    axis2_char_t *value = NULL;
     axis2_char_t *temp_value = NULL;
     axis2_om_node_t *node = NULL;
     axis2_om_stax_builder_impl_t *builder = NULL;
@@ -232,36 +307,30 @@
     if (!builder->lastnode)
         AXIS2_ERROR_SET((*env)->error, 
                          AXIS2_ERROR_INVALID_BUILDER_STATE_LAST_NODE_NULL,NULL);
-
-    
-    
     temp_value = AXIS2_PULL_PARSER_GET_VALUE (builder->parser, env);
 
     if (!temp_value)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_PULL_PARSER_VALUE_NULL, NULL);
     }
-    else
-    {
-        value = (axis2_char_t*)AXIS2_STRDUP ( temp_value,env);
-        AXIS2_FREE((*env)->allocator, temp_value);
-    }
+    
 
     if (AXIS2_OM_NODE_GET_BUILD_STATUS(builder->lastnode, env))
     {
         axis2_om_text_create (env, 
                               AXIS2_OM_NODE_GET_PARENT(builder->lastnode, env),
-                              value, &node);
+                              temp_value, &node);
 
     }
     else
     {
-        axis2_om_text_create (env, builder->lastnode, value, &node);
+        axis2_om_text_create (env, builder->lastnode, temp_value, &node);
     }
 
     AXIS2_OM_NODE_SET_BUILD_STATUS(node , env, AXIS2_TRUE);
     builder->lastnode = node;
-
+    
+    AXIS2_PULL_PARSER_XML_FREE(builder->parser , env, temp_value);
     return node;
 }
 
@@ -324,7 +393,12 @@
     axis2_status_t status = AXIS2_SUCCESS;
     int namespace_count = 0;
     axis2_om_namespace_t *om_ns = NULL;
+    /* temp values */
     axis2_char_t *temp_prefix = NULL;
+    axis2_char_t *temp_ns_prefix = NULL;
+    axis2_char_t *temp_ns_uri    = NULL;
+    
+    
     axis2_om_stax_builder_impl_t *builder = NULL;
     int i=0;
     AXIS2_FUNC_PARAM_CHECK(om_stax_builder, env, AXIS2_FAILURE);
@@ -337,13 +411,20 @@
     
     for (i = 1; i <= namespace_count; i++)
     {
-        om_ns = axis2_om_namespace_create (
-                env,
-                AXIS2_PULL_PARSER_GET_NAMESPACE_URI_BY_NUMBER(
-                builder->parser, env , i),
-                AXIS2_PULL_PARSER_GET_NAMESPACE_PREFIX_BY_NUMBER(
-                 builder->parser, env, i));
+        temp_ns_prefix = AXIS2_PULL_PARSER_GET_NAMESPACE_PREFIX_BY_NUMBER(
+                                builder->parser, env, i);
+                                
+        temp_ns_uri = AXIS2_PULL_PARSER_GET_NAMESPACE_URI_BY_NUMBER(
+                            builder->parser, env , i);
+                            
+                                                       
+        om_ns = axis2_om_namespace_create ( env,
+                         temp_ns_uri, temp_ns_prefix );
                 
+        AXIS2_PULL_PARSER_XML_FREE(builder->parser, env, temp_ns_prefix);
+        AXIS2_PULL_PARSER_XML_FREE(builder->parser, env, temp_ns_uri);
+        
+                        
         if (om_ns)
         {
             status = AXIS2_OM_ELEMENT_DECLARE_NAMESPACE(
@@ -377,6 +458,7 @@
              AXIS2_ERROR_INVALID_DOCUMENT_STATE_UNDEFINED_NAMESPACE, AXIS2_FAILURE);
         }
     }
+    AXIS2_PULL_PARSER_XML_FREE(builder->parser, env, temp_prefix);
     return status;
 }
 
@@ -385,63 +467,56 @@
                                          axis2_env_t **env)
 {
     axis2_om_node_t *element_node;
-    axis2_char_t *localname = NULL;
-    axis2_om_stax_builder_impl_t *builder = NULL;
+    axis2_om_stax_builder_impl_t *builder_impl = NULL;
     axis2_char_t *temp_localname = NULL;
     
     AXIS2_FUNC_PARAM_CHECK(om_stax_builder, env, NULL);
     
-    builder = AXIS2_INTF_TO_IMPL(om_stax_builder);
+    builder_impl = AXIS2_INTF_TO_IMPL(om_stax_builder);
     
-    temp_localname  = AXIS2_PULL_PARSER_GET_NAME (builder->parser, env);
+    temp_localname  = AXIS2_PULL_PARSER_GET_NAME (builder_impl->parser, env);
 
     if (!temp_localname)
     {
         AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_PULL_PARSER_ELEMENT_NULL, NULL); 
     }
-    else
-    {
-        localname = (axis2_char_t *)AXIS2_STRDUP (temp_localname,env);
-        AXIS2_FREE ((*env)->allocator, temp_localname); 
-        /*we should be using guththila free here */
-    }
-
-    if (!(builder->lastnode))
+    
+    if (!(builder_impl->lastnode))
     {
-        axis2_om_element_create (env , NULL, localname, NULL, &element_node);
+        axis2_om_element_create (env , NULL, temp_localname, NULL, &element_node);
         
         /*
-        if (AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(builder->document, env))
+        if (AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(builder_impl->document, env))
              AXIS2_OM_NODE_FREE_TREE(
-                AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(builder->document, env),env);*/
+                AXIS2_OM_DOCUMENT_GET_ROOT_ELEMENT(builder_impl->document, env),env);*/
                 
-        AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(builder->document, env, element_node);
+        AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(builder_impl->document, env, element_node);
         
     }
-    else if (AXIS2_OM_NODE_GET_BUILD_STATUS(builder->lastnode, env))
+    else if (AXIS2_OM_NODE_GET_BUILD_STATUS(builder_impl->lastnode, env))
     {
-        axis2_om_element_create (env, AXIS2_OM_NODE_GET_PARENT(builder->lastnode, env),
-                                 localname, NULL, &element_node);
+        axis2_om_element_create (env, AXIS2_OM_NODE_GET_PARENT(builder_impl->lastnode, env),
+                                 temp_localname, NULL, &element_node);
              
-        AXIS2_OM_NODE_SET_NEXT_SIBLING(builder->lastnode, env, element_node);                                 
-        AXIS2_OM_NODE_SET_PREVIOUS_SIBLING(builder->lastnode , env, builder->lastnode);
+        AXIS2_OM_NODE_SET_NEXT_SIBLING(builder_impl->lastnode, env, element_node);                                 
+        AXIS2_OM_NODE_SET_PREVIOUS_SIBLING(element_node , env, builder_impl->lastnode);
     }
     else
     {
-        axis2_om_element_create ( env, builder->lastnode,
-                                 localname, NULL, &element_node);
+        axis2_om_element_create ( env, builder_impl->lastnode,
+                                 temp_localname, NULL, &element_node);
         
-        AXIS2_OM_NODE_SET_FIRST_CHILD(builder->lastnode , env, element_node);                     
-        AXIS2_OM_NODE_SET_PARENT(element_node , env, builder->lastnode);
+        AXIS2_OM_NODE_SET_FIRST_CHILD(builder_impl->lastnode , env, element_node);                     
+        AXIS2_OM_NODE_SET_PARENT(element_node , env, builder_impl->lastnode);
     }
     
+    AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser , env, temp_localname);
+    
     axis2_om_stax_builder_process_attributes ( om_stax_builder, env, element_node);
     axis2_om_stax_builder_process_namespaces ( om_stax_builder, env, element_node, 0);
     
-    builder->lastnode = element_node;
+    builder_impl->lastnode = element_node;
 	
-	/*axis2_free(environment->allocator, localname); */
-
     return element_node;
 }
 
@@ -450,9 +525,50 @@
 axis2_om_stax_builder_create_om_comment (axis2_om_stax_builder_t *builder,
                                          axis2_env_t **env)
 {
+    axis2_om_node_t *comment_node = NULL;
+    axis2_om_stax_builder_impl_t *builder_impl = NULL;
+    axis2_char_t *comment_value = NULL;
     AXIS2_FUNC_PARAM_CHECK(builder, env, NULL);
-    /* guththila does not support comments */
-    return NULL;
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    comment_value  = AXIS2_PULL_PARSER_GET_VALUE(builder_impl->parser, env);
+
+    if (!comment_value)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_PULL_PARSER_ELEMENT_NULL, NULL); 
+    }
+    
+    if (!(builder_impl->lastnode))
+    {
+        axis2_om_comment_create (env , NULL, comment_value, &comment_node);
+        AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(builder_impl->document,
+            env, comment_node);
+        
+    }
+    else if (AXIS2_OM_NODE_GET_BUILD_STATUS(builder_impl->lastnode, env))
+    {
+        axis2_om_comment_create (env, 
+            AXIS2_OM_NODE_GET_PARENT(builder_impl->lastnode, env),
+                comment_value , &comment_node);
+             
+        AXIS2_OM_NODE_SET_NEXT_SIBLING(builder_impl->lastnode, env, comment_node);                                 
+        AXIS2_OM_NODE_SET_PREVIOUS_SIBLING(comment_node , env, builder_impl->lastnode);
+    }
+    else
+    {
+        axis2_om_comment_create( env, builder_impl->lastnode,
+                                 comment_value ,&comment_node);
+        
+        AXIS2_OM_NODE_SET_FIRST_CHILD(builder_impl->lastnode , env, comment_node);                     
+        AXIS2_OM_NODE_SET_PARENT(comment_node , env, builder_impl->lastnode);
+    }
+    
+    AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser , env, comment_value);
+    
+    builder_impl->lastnode = comment_node;
+	
+    return comment_node;
+    
 }
 
 
@@ -460,9 +576,27 @@
 axis2_om_stax_builder_create_om_doctype (axis2_om_stax_builder_t * builder,
                                          axis2_env_t **env)
 {
+    axis2_om_stax_builder_impl_t *builder_impl;
+    axis2_om_node_t *doctype_node = NULL;
+    axis2_char_t *doc_value = NULL;
+    
     AXIS2_FUNC_PARAM_CHECK(builder, env, NULL);
-    /*  guththila does not support doctype */
-    return NULL;
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    doc_value = AXIS2_PULL_PARSER_GET_DTD(builder_impl->parser, env);
+    if(!doc_value)
+        return NULL;
+    if(!(builder_impl->lastnode))
+    {
+        axis2_om_doctype_create(env, NULL, doc_value, &doctype_node);
+        AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(builder_impl->document, env,
+                                            doctype_node);
+        
+    }
+    builder_impl->lastnode = doctype_node;
+    
+    AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser, env, doc_value);
+    return doctype_node;
 }
 
  
@@ -470,9 +604,49 @@
 axis2_om_stax_builder_create_om_processing_instruction (axis2_om_stax_builder_t *builder,
                                                         axis2_env_t **env)
 {
+    axis2_om_node_t *pi_node;
+    axis2_om_stax_builder_impl_t *builder_impl = NULL;
+    axis2_char_t *target = NULL;
+    axis2_char_t *value  = NULL;
+    
     AXIS2_FUNC_PARAM_CHECK(builder, env, NULL);
-    /* guththila does not support processing instrtuctions */
-    return NULL;
+    builder_impl = AXIS2_INTF_TO_IMPL(builder);
+    
+    target = AXIS2_PULL_PARSER_GET_PI_TARGET (builder_impl->parser, env);
+    value  = AXIS2_PULL_PARSER_GET_PI_DATA(builder_impl->parser, env);
+    if (!target)
+    {
+        AXIS2_ERROR_SET((*env)->error, AXIS2_ERROR_PULL_PARSER_ELEMENT_NULL, NULL); 
+    }
+    
+    if (!(builder_impl->lastnode))
+    {
+        axis2_om_processing_instruction_create(env, NULL, target, value, &pi_node);
+        AXIS2_OM_DOCUMENT_SET_ROOT_ELEMENT(builder_impl->document, env, pi_node);
+    }
+    else if (AXIS2_OM_NODE_GET_BUILD_STATUS(builder_impl->lastnode, env) ||
+     (AXIS2_OM_NODE_GET_NODE_TYPE(builder_impl->lastnode, env) == AXIS2_OM_TEXT))
+    {
+        axis2_om_processing_instruction_create(env,
+                        AXIS2_OM_NODE_GET_PARENT(builder_impl->lastnode, env),
+                        target, value, &pi_node);
+                 
+        AXIS2_OM_NODE_SET_NEXT_SIBLING(builder_impl->lastnode, env, pi_node);                                 
+        AXIS2_OM_NODE_SET_PREVIOUS_SIBLING(pi_node , env, builder_impl->lastnode);
+    }
+    else
+    {
+        axis2_om_processing_instruction_create( env, builder_impl->lastnode,
+                                 target, value, &pi_node);
+        
+        AXIS2_OM_NODE_SET_FIRST_CHILD(builder_impl->lastnode , env, pi_node);                     
+        AXIS2_OM_NODE_SET_PARENT(pi_node , env, builder_impl->lastnode);
+    }
+    
+    AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser , env, target);
+    AXIS2_PULL_PARSER_XML_FREE(builder_impl->parser , env, value);
+    builder_impl->lastnode = pi_node;
+    return pi_node;
 }
 
 axis2_status_t AXIS2_CALL
@@ -539,8 +713,9 @@
             break;
         
         case AXIS2_PULL_PARSER_START_ELEMENT:
+            
            node = axis2_om_stax_builder_create_om_element (
-                         om_stax_builder, env); 
+                        om_stax_builder, env); 
             break;
         
         case AXIS2_PULL_PARSER_EMPTY_ELEMENT:
@@ -548,6 +723,7 @@
                         om_stax_builder, env);
         
         case AXIS2_PULL_PARSER_END_ELEMENT:
+            
             axis2_om_stax_builder_end_element (om_stax_builder, env);
             break;
         
@@ -557,24 +733,30 @@
             break;
         
         case AXIS2_PULL_PARSER_CHARACTER:
-            node =
-                axis2_om_stax_builder_create_om_text (om_stax_builder, env);
+            node = axis2_om_stax_builder_create_om_text(om_stax_builder, env);
             break;
                 
         case AXIS2_PULL_PARSER_ENTITY_REFERANCE:
             break;
         
         case AXIS2_PULL_PARSER_COMMENT:
+        /* node =  axis2_om_stax_builder_create_om_comment(om_stax_builder, env);
+        */
             break;
         
         case AXIS2_PULL_PARSER_PROCESSING_INSTRUCTION:
+          /*  node = axis2_om_stax_builder_create_om_processing_instruction(
+                                        om_stax_builder , env );
+            */
             break;
         
         case AXIS2_PULL_PARSER_CDATA:
             break;
         
         case AXIS2_PULL_PARSER_DOCUMENT_TYPE:
-            break;
+        /* node = axis2_om_stax_builder_create_om_doctype(om_stax_builder, env);
+        */          
+        break;
         
         default:
             break;

Modified: webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/src/axis2_om_text.c Sun Nov 20 19:53:26 2005
@@ -177,6 +177,8 @@
 {
     AXIS2_FUNC_PARAM_CHECK(om_text, env, AXIS2_FAILURE);
     AXIS2_PARAM_CHECK((*env)->error , om_text, AXIS2_FAILURE);
+    if(AXIS2_INTF_TO_IMPL(om_text)->value)
+        AXIS2_FREE((*env)->allocator, AXIS2_INTF_TO_IMPL(om_text)->value);
     AXIS2_INTF_TO_IMPL(om_text)->value = (axis2_char_t*)AXIS2_STRDUP(value,env);
     return AXIS2_SUCCESS;
 }

Modified: webservices/axis2/trunk/c/modules/xml/om/test/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/test/Makefile.am?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/test/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/om/test/Makefile.am Sun Nov 20 19:53:26 2005
@@ -2,7 +2,9 @@
 prglibdir=$(prefix)/lib/unit_test
 prglib_LTLIBRARIES = libtest_om.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libtest_om_la_SOURCES = om_test.c
+libtest_om_la_SOURCES = om_test.c om_node_test.c
+
+                        
 include_HEADERS=$(top_builddir)/modules/xml/om/test/*.h
 
 libtest_om_la_LIBADD = $(LDFLAGS) -L$(top_builddir)/modules/xml/om/src/.libs -laxis2_om

Modified: webservices/axis2/trunk/c/modules/xml/om/test/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/test/Makefile.in?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/test/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/xml/om/test/Makefile.in Sun Nov 20 19:53:26 2005
@@ -67,7 +67,7 @@
 LTLIBRARIES = $(prglib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 libtest_om_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
-am_libtest_om_la_OBJECTS = om_test.lo
+am_libtest_om_la_OBJECTS = om_test.lo om_node_test.lo
 libtest_om_la_OBJECTS = $(am_libtest_om_la_OBJECTS)
 prgbinPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
 PROGRAMS = $(prgbin_PROGRAMS)
@@ -203,7 +203,7 @@
 prglibdir = $(prefix)/lib/unit_test
 prglib_LTLIBRARIES = libtest_om.la
 AM_CPPFLAGS = $(CPPFLAGS)
-libtest_om_la_SOURCES = om_test.c
+libtest_om_la_SOURCES = om_test.c om_node_test.c
 include_HEADERS = $(top_builddir)/modules/xml/om/test/*.h
 libtest_om_la_LIBADD = $(LDFLAGS) -L$(top_builddir)/modules/xml/om/src/.libs -laxis2_om
 INCLUDES = -I$(top_builddir)/include \
@@ -318,6 +318,7 @@
 	-rm -f *.tab.c
 
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/om_node_test.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/om_test.Plo@am__quote@
 
 .c.o:

Modified: webservices/axis2/trunk/c/modules/xml/om/test/om_test.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/test/om_test.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/test/om_test.c (original)
+++ webservices/axis2/trunk/c/modules/xml/om/test/om_test.c Sun Nov 20 19:53:26 2005
@@ -3,10 +3,15 @@
 #include <stdio.h>
 #include <axis2_allocator.h>
 #include <axis2_env.h>
+#include <om_node_test.h>
 
 CuSuite* axis2_omGetSuite() {
     CuSuite* suite = CuSuiteNew();
-    /*SUITE_ADD_TEST(suite, Testaxis2_stream_ops_read);*/
+    SUITE_ADD_TEST(suite, Testaxis2_om_node_add_child);
+    SUITE_ADD_TEST(suite, Testaxis2_om_node_set_parent);
+    SUITE_ADD_TEST(suite,Testaxis2_om_node_insert_sibling_after);
+    SUITE_ADD_TEST(suite,Testaxis2_om_node_insert_sibling_before);
+    SUITE_ADD_TEST(suite,Testaxis2_om_node_detach);
+
     return suite;
 }
-

Modified: webservices/axis2/trunk/c/modules/xml/om/test/om_test.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/om/test/om_test.h?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/om/test/om_test.h (original)
+++ webservices/axis2/trunk/c/modules/xml/om/test/om_test.h Sun Nov 20 19:53:26 2005
@@ -2,7 +2,6 @@
 #define OM_TEST_H
 
 #include <CuTest.h>
-/*#include "om_error_test.h"*/
 
 CuSuite* axis2_omGetSuite();
 

Modified: webservices/axis2/trunk/c/modules/xml/parser/axis2_pull_parser.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/axis2_pull_parser.h?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/axis2_pull_parser.h (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/axis2_pull_parser.h Sun Nov 20 19:53:26 2005
@@ -81,65 +81,168 @@
         
         axis2_status_t (AXIS2_CALL *free)(axis2_pull_parser_t *parser,
                                           axis2_env_t **env);
-           
+        /**
+         * Get the Number of attributes in the current element 
+         * @param parser axis2_pull_parser struct 
+         * @param env    axis2_environment struct 
+         * @returns Number of attributes , AXIS2_FAILURE on error 
+         */  
         
         int (AXIS2_CALL *get_attribute_count)(axis2_pull_parser_t *parser,
                                               axis2_env_t **env);
-        /* iterations start with 1 and not zero based
-         * 
-         *
+       /** This is used to get an attribute's localname using an index relative to 
+         * current element The iterations are not zero based. 
+         * To access the first attribute use 1 for parameter i
+         * @param parser parser struct 
+         * @param env environment struct
+         * @param i attribute index
+         * @returns the attribute localname 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro         
          */
         axis2_char_t* (AXIS2_CALL *get_attribute_name_by_number)
                                                     (axis2_pull_parser_t *parser,
                                                      axis2_env_t **env,
                                                      int i);
+                                                     
+       /** This is used to get an attribute's prefix using an index relative to 
+         * current element. The iterations are not zero based. 
+         * To access the first attribute use 1 for parameter i
+         * @param parser parser struct 
+         * @param env environment struct
+         * @param i attribute index
+         * @returns the attribute prefix, returns NULL on error  
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro         
+         */                                                     
         
         axis2_char_t* (AXIS2_CALL *get_attribute_prefix_by_number)
                                                     (axis2_pull_parser_t *parser,
                                                      axis2_env_t **env,
                                                      int i);
-                                                     
+        /** This is used to get an attribute's value using an index relative to 
+         * current element. The iterations are not zero based. 
+         * To access the first attribute use 1 for parameter i
+         * @param parser parser struct 
+         * @param env environment struct
+         * @param i attribute index
+         * @returns the attribute value, returns NULL on error
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro         
+         */                                            
         axis2_char_t* (AXIS2_CALL *get_attribute_value_by_number)
                                                     (axis2_pull_parser_t *parser,
                                                      axis2_env_t **env,
                                                      int i);
-        
+        /** This is used to get an attribute's namespace uri using an index relative to 
+         * current element. The iterations are not zero based. 
+         * To access the first attribute use 1 for parameter i
+         * @param parser parser struct 
+         * @param env environment struct
+         * @param i attribute index
+         * @returns the attribute value, returns NULL on error  
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro        
+         */ 
         
         axis2_char_t* (AXIS2_CALL *get_attribute_namespace_by_number)
                                                     (axis2_pull_parser_t *parser,
                                                      axis2_env_t **env,
                                                      int i);
-
+       /** returns the text value of current element
+         * @param parser 
+         * @param env
+         * @returns Text Value, NULL on error 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro 
+         */
                                 
         axis2_char_t* (AXIS2_CALL *get_value)(axis2_pull_parser_t *parser,
                                               axis2_env_t **env);
-                                                      
+        
+        /**
+         * Returns the namespace count of current element 
+         *@param parser parser struct 
+         *@param env environment
+         *@returns namespace count , caller must free the value using 
+         *                           AXIS2_PULL_PARSER_XML_FREE macro
+         */
         int (AXIS2_CALL *get_namespace_count)(axis2_pull_parser_t *parser,
                                               axis2_env_t **env);
-
+        /**
+         * access the namespace uri of the namespaces declared in current element 
+         * using an index 
+         * @param parser parser struct 
+         * @param env environment 
+         * @param i index
+         * @returns namespace uri of corresponding namespace 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro         
+         */
         axis2_char_t* (AXIS2_CALL *get_namespace_uri_by_number)
                                               (axis2_pull_parser_t *parser,
                                                axis2_env_t **env,
                                                int i);
-                                               
+        /**
+         * access the namespace prefix of the namespaces declared in current element 
+         * using an index 
+         * @param parser parser struct 
+         * @param env environment 
+         * @param i index
+         * @returns namespace prefix of corresponding namespace 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro         
+         */                                               
         axis2_char_t* (AXIS2_CALL *get_namespace_prefix_by_number)
                                                (axis2_pull_parser_t *parser,
                                                 axis2_env_t **env,
                                                 int i); 
-                                                
+        /**
+         *  Used to obtain the current element prefix
+         * @param parser parser struct 
+         * @param env environment struct
+         * @returns prefix , NULL on error 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro
+         */         
+        
         axis2_char_t* (AXIS2_CALL *get_prefix)(axis2_pull_parser_t *parser,
                                                axis2_env_t **env);   
-        
+        /**
+         *  Used to obtain the current element localname
+         * @param parser parser struct 
+         * @param env environment struct
+         * @returns localname , NULL on error 
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro
+         */         
         axis2_char_t* (AXIS2_CALL *get_name)(axis2_pull_parser_t *parser,
                                              axis2_env_t **env); 
-
+        /**
+         * Used to get the processingInstruction target
+         *@param parser parser struct
+         *@param env environment
+         *@returns target value of processingInstruction
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro
+         */        
         axis2_char_t* (AXIS2_CALL *get_pi_target)(axis2_pull_parser_t *parser,
                                                   axis2_env_t **env);
+        /**
+         * Used to get the processingInstruction data
+         *@param parser parser struct
+         *@param env environment
+         *@returns data of processingInstruction
+         *          caller must free the value using AXIS2_PULL_PARSER_XML_FREE macro
+         */        
+
 
         axis2_char_t* (AXIS2_CALL *get_pi_data)(axis2_pull_parser_t *parser,
                                                 axis2_env_t **env);
-                                                
-        
+        /**
+         *  used to get the DTD 
+         *
+         */         
+        axis2_char_t* (AXIS2_CALL *get_dtd)(axis2_pull_parser_t *parser,
+                                            axis2_env_t **env);                                                
+        /**
+         *  Free function , this function wraps the underlying parser's 
+         *  free function
+         * @param data data values to be destroyed         
+         */         
+        axis2_status_t (AXIS2_CALL *xml_free)(axis2_pull_parser_t *parser,
+                                   axis2_env_t **env,
+                                   void *data);                                                
     };
      
 /** 
@@ -153,14 +256,24 @@
 
 /**
  * create pull parser struct
- *
+ * @param env environment struct , must not be null
+ * @param filename filename of an xml document
+ * @returns a pointer to xml_pull_parser_t struct
+ *          NULL on error with error code set in the environment's error 
  */
 
 AXIS2_DECLARE(axis2_pull_parser_t *)
-axis2_pull_parser_create(axis2_env_t **env,void *stream);
+axis2_pull_parser_create_for_file(axis2_env_t **env,char *filename);
 
+AXIS2_DECLARE(axis2_pull_parser_t *)
+axis2_pull_parser_create_for_memory(axis2_env_t **env,
+                                    int (*read_input_callback)(char *buffer,int size),
+                                    void (*close_input_callback)(void));
+                                    
 /********************************* Macros *************************************/
 
+/** Macros corresponding to above declared function pointers */
+
 #define AXIS2_PULL_PARSER_NEXT(parser, env) \
         ((parser)->ops->next(parser, env))
 
@@ -206,6 +319,12 @@
 #define AXIS2_PULL_PARSER_GET_PI_TARGET(parser, env) \
         ((parser)->ops->get_pi_target(parser, env))
         
+#define AXIS2_PULL_PARSER_GET_DTD(parser, env) \
+        ((parser)->ops->get_dtd(parser, env))
+        
+#define AXIS2_PULL_PARSER_XML_FREE(parser, env, data) \
+        ((parser)->ops->xml_free(parser, env, data))
+
 
 /******************************* End Macros ***********************************/
 /** @} */

Modified: webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/axis2_xml_writer.h Sun Nov 20 19:53:26 2005
@@ -49,66 +49,93 @@
 
     AXIS2_DECLARE_DATA struct axis2_xml_writer_ops 
     {
+       /**
+        * Free xml writer
+        * @param writer pointer to xml_writer struct
+        * @returns status code 
+        *       AXIS2_SUCCESS on success and AXIS2_FAILURE on error
+        */
         
         axis2_status_t (AXIS2_CALL *free)(axis2_xml_writer_t *writer,
                                           axis2_env_t **env);
-        
+       /**
+        *   Write start part of xml element
+        */
         axis2_status_t (AXIS2_CALL *write_start_element)(
                                     axis2_xml_writer_t *writer,
                                     axis2_env_t **env, axis2_char_t *localname);
-        
+       /**
+        *        writer end part of start element
+        */
         axis2_status_t (AXIS2_CALL *end_start_element)(axis2_xml_writer_t *writer,
                                                        axis2_env_t **env);
-        
+        /**
+         * Write element with namespace uri
+         */
         axis2_status_t (AXIS2_CALL *write_start_element_with_namespace)(
                                         axis2_xml_writer_t *writer,
                                         axis2_env_t **env,
                                         axis2_char_t *localname,
                                         axis2_char_t *namespace_uri);
-        
+        /**
+         * Write element with namespace uri and prefix
+         */
         axis2_status_t (AXIS2_CALL *write_start_element_with_namespace_prefix)(
                                         axis2_xml_writer_t *writer,
                                         axis2_env_t **env,
                                         axis2_char_t *localname,
                                         axis2_char_t *namespace_uri,
                                         axis2_char_t *prefix);       
-                                    
+        /**
+         * write empty_element 
+         */         
         axis2_status_t (AXIS2_CALL *write_empty_element)(
                                         axis2_xml_writer_t *writer,
                                         axis2_env_t **env,
                                         axis2_char_t *localname);
+        /**
+         * write empty_element with namespace uri
+         */
         
         axis2_status_t (AXIS2_CALL *write_empty_element_with_namespace)(
                                         axis2_xml_writer_t *writer,
                                         axis2_env_t **env,
                                         axis2_char_t *localname,
                                         axis2_char_t *namespace_uri);
-
+        /**
+         * write empty element with namespace uri and prefix 
+         */
         axis2_status_t (AXIS2_CALL *write_empty_element_with_namespace_prefix)(
                                         axis2_xml_writer_t *writer,
                                         axis2_env_t **env,
                                         axis2_char_t *localname,
                                         axis2_char_t *namespace_uri,
                                         axis2_char_t *prefix);
-
+        /**
+         * write end element 
+         */
         axis2_status_t (AXIS2_CALL *write_end_element)(axis2_xml_writer_t *writer,
                                                        axis2_env_t **env);
-        
+        /**
+         * write end document
+         */
         axis2_status_t (AXIS2_CALL *write_end_document)(axis2_xml_writer_t *writer,
                                                        axis2_env_t **env);
-        
+        /**
+         * write attribute 
+         */
         axis2_status_t (AXIS2_CALL *write_attribute)(axis2_xml_writer_t *writer,
                                                      axis2_env_t **env,
                                                      axis2_char_t *localname,
                                                      axis2_char_t *value);
-                                                       
+         
         axis2_status_t (AXIS2_CALL *write_attribute_with_namespace)(
                                                   axis2_xml_writer_t *writer,
                                                   axis2_env_t **env,
                                                   axis2_char_t *localname,
                                                   axis2_char_t *value,
                                                   axis2_char_t *namespace_uri);
-                                                  
+
         axis2_status_t (AXIS2_CALL *write_attribute_with_namespace_prefix)(
                                                   axis2_xml_writer_t *writer,
                                                   axis2_env_t **env,

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.am
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.am?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.am (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.am Sun Nov 20 19:53:26 2005
@@ -11,7 +11,6 @@
                             guththila_allocator.c \
                             guththila_array.c \
                             guththila_string.c \
-                            guththila_stream.c \
                             guththila_environment.c \
                             guththila_log.c \
                             guththila_error.c \

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.in
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.in?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.in (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/Makefile.in Sun Nov 20 19:53:26 2005
@@ -67,8 +67,8 @@
 	guththila_xml_stream_writer.lo guththila_stack.lo \
 	guththila_unicode.lo guththila_main.lo guththila_reader.lo \
 	guththila_allocator.lo guththila_array.lo guththila_string.lo \
-	guththila_stream.lo guththila_environment.lo guththila_log.lo \
-	guththila_error.lo guththila_hash.lo
+	guththila_environment.lo guththila_log.lo guththila_error.lo \
+	guththila_hash.lo
 libguththila_la_OBJECTS = $(am_libguththila_la_OBJECTS)
 DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
 depcomp = $(SHELL) $(top_srcdir)/conftools/depcomp
@@ -206,7 +206,6 @@
                             guththila_allocator.c \
                             guththila_array.c \
                             guththila_string.c \
-                            guththila_stream.c \
                             guththila_environment.c \
                             guththila_log.c \
                             guththila_error.c \
@@ -293,7 +292,6 @@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_main.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_reader.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_stack.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_stream.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_string.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_token.Plo@am__quote@
 @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/guththila_unicode.Plo@am__quote@

Modified: webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_allocator.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_allocator.c?rev=345821&r1=345820&r2=345821&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_allocator.c (original)
+++ webservices/axis2/trunk/c/modules/xml/parser/guththila/impl/src/guththila_allocator.c Sun Nov 20 19:53:26 2005
@@ -30,10 +30,10 @@
             (guththila_allocator_t *) malloc (sizeof (guththila_allocator_t));
         if (allocator)
         {
-            allocator->guththila_allocator_malloc = malloc;
-            allocator->guththila_allocator_realloc = realloc;
-            allocator->guththila_allocator_free = free;
-            allocator->guththila_allocator_calloc = calloc;
+            allocator->malloc = malloc;
+            allocator->realloc = realloc;
+            allocator->free = free;
+            allocator->calloc = calloc;
             return allocator;
         }
     }



Mime
View raw message