Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 64312 invoked from network); 24 Jan 2007 10:46:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 24 Jan 2007 10:46:53 -0000 Received: (qmail 55944 invoked by uid 500); 24 Jan 2007 10:46:59 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 55723 invoked by uid 500); 24 Jan 2007 10:46:58 -0000 Mailing-List: contact axis-cvs-help@ws.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-cvs@ws.apache.org Received: (qmail 55712 invoked by uid 500); 24 Jan 2007 10:46:58 -0000 Delivered-To: apmail-ws-axis2-cvs@ws.apache.org Received: (qmail 55709 invoked by uid 99); 24 Jan 2007 10:46:58 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 02:46:58 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Jan 2007 02:46:51 -0800 Received: by eris.apache.org (Postfix, from userid 65534) id 128351A981D; Wed, 24 Jan 2007 02:45:44 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r499349 - in /webservices/axis2/trunk/c: axiom/src/parser/guththila/ guththila/include/ guththila/src/ Date: Wed, 24 Jan 2007 10:45:43 -0000 To: axis2-cvs@ws.apache.org From: dinesh@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070124104544.128351A981D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dinesh Date: Wed Jan 24 02:45:42 2007 New Revision: 499349 URL: http://svn.apache.org/viewvc?view=rev&rev=499349 Log: guththila get buffer size function implemented Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c webservices/axis2/trunk/c/guththila/include/guththila.h webservices/axis2/trunk/c/guththila/include/guththila_writer.h webservices/axis2/trunk/c/guththila/src/guththila_writer.c webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c (original) +++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_reader_wrapper.c Wed Jan 24 02:45:42 2007 @@ -488,6 +488,7 @@ if (parser->ops) AXIS2_FREE(env->allocator, parser->ops); + AXIS2_FREE(env->allocator, parser_impl); return AXIS2_SUCCESS; } @@ -669,4 +670,3 @@ data); return AXIS2_SUCCESS; } - Modified: webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c (original) +++ webservices/axis2/trunk/c/axiom/src/parser/guththila/guththila_xml_writer_wrapper.c Wed Jan 24 02:45:42 2007 @@ -214,6 +214,11 @@ axiom_xml_writer_t *writer, const axis2_env_t *env); +unsigned int AXIS2_CALL +guththila_xml_writer_wrapper_get_xml_size( + axiom_xml_writer_t *writer, + const axis2_env_t *env); + axis2_status_t AXIS2_CALL guththila_xml_writer_wrapper_write_raw ( axiom_xml_writer_t *writer, @@ -352,6 +357,8 @@ guththila_xml_writer_wrapper_write_encoded; writer_impl->writer.ops->get_xml = guththila_xml_writer_wrapper_get_xml; + writer_impl->writer.ops->get_xml_size = + guththila_xml_writer_wrapper_get_xml_size; writer_impl->writer.ops->write_raw = guththila_xml_writer_wrapper_write_raw; @@ -473,7 +480,9 @@ guththila_xml_writer_wrapper_write_encoded; writer_impl->writer.ops->get_xml = guththila_xml_writer_wrapper_get_xml; - writer_impl->writer.ops->write_raw = + writer_impl->writer.ops->get_xml_size = + guththila_xml_writer_wrapper_get_xml_size; + writer_impl->writer.ops->write_raw = guththila_xml_writer_wrapper_write_raw; return &(writer_impl->writer); @@ -977,4 +986,13 @@ guththila_flush ((axis2_env_t *)env, AXIS2_INTF_TO_IMPL (writer)->parser); return AXIS2_SUCCESS; } +} + +unsigned int AXIS2_CALL +guththila_xml_writer_wrapper_get_xml_size ( axiom_xml_writer_t *writer, + const axis2_env_t *env) +{ + AXIS2_ENV_CHECK(env, AXIS2_FAILURE); + return guththila_get_memory_buffer_size ((axis2_env_t *)env, + AXIS2_INTF_TO_IMPL(writer)->parser); } Modified: webservices/axis2/trunk/c/guththila/include/guththila.h URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila.h?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/guththila/include/guththila.h (original) +++ webservices/axis2/trunk/c/guththila/include/guththila.h Wed Jan 24 02:45:42 2007 @@ -618,6 +618,11 @@ guththila_get_memory_buffer (axis2_env_t *environemnt, guththila_t *p); +AXIS2_EXTERN unsigned int AXIS2_CALL +guththila_get_memory_buffer_size(axis2_env_t *env, + guththila_t *p); + + AXIS2_EXTERN void AXIS2_CALL guththila_xml_writer_free (axis2_env_t *environment, guththila_t *t); Modified: webservices/axis2/trunk/c/guththila/include/guththila_writer.h URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/include/guththila_writer.h?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/guththila/include/guththila_writer.h (original) +++ webservices/axis2/trunk/c/guththila/include/guththila_writer.h Wed Jan 24 02:45:42 2007 @@ -67,4 +67,9 @@ AXIS2_EXTERN char * AXIS2_CALL guththila_writer_get_buffer (axis2_env_t *env, guththila_writer_t *wt); + +AXIS2_EXTERN unsigned int AXIS2_CALL +guththila_writer_get_buffer_size (axis2_env_t *env, + guththila_writer_t *wt); + #endif /* GUTHTHILA_WRITE_H */ Modified: webservices/axis2/trunk/c/guththila/src/guththila_writer.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_writer.c?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/guththila/src/guththila_writer.c (original) +++ webservices/axis2/trunk/c/guththila/src/guththila_writer.c Wed Jan 24 02:45:42 2007 @@ -91,6 +91,7 @@ writer_impl->buffer = guththila_buffer_grow(env, writer_impl->buffer); } memcpy (writer_impl->buffer->buff, buffer, strlen (buffer)); + writer_impl->buffer->next += length; c = length; } return c; @@ -108,6 +109,19 @@ return (char *)writer_impl->buffer->buff; else return (char *)NULL; +} + +AXIS2_EXTERN unsigned int AXIS2_CALL +guththila_writer_get_buffer_size (axis2_env_t *env, + guththila_writer_t *wt) +{ + guththila_writer_impl_t *writer_impl = NULL; + unsigned int size = 0; + writer_impl = (guththila_writer_impl_t *)wt; + + if (writer_impl->buffer->buff) + size = (unsigned int) writer_impl->buffer->next; + return size; } Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c (original) +++ webservices/axis2/trunk/c/guththila/src/guththila_xml_pull_parser.c Wed Jan 24 02:45:42 2007 @@ -72,7 +72,10 @@ guththila_token_free (environment, parser->name); if (parser->stack) + { AXIS2_STACK_FREE(parser->stack, environment); + } + if (parser->attrib) { int ii = AXIS2_STACK_SIZE(parser->attrib, environment); @@ -84,6 +87,7 @@ } AXIS2_STACK_FREE(parser->attrib, environment); } + if (parser->namesp) AXIS2_STACK_FREE(parser->namesp, environment); if (parser->dep) Modified: webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c?view=diff&rev=499349&r1=499348&r2=499349 ============================================================================== --- webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c (original) +++ webservices/axis2/trunk/c/guththila/src/guththila_xml_writer.c Wed Jan 24 02:45:42 2007 @@ -23,7 +23,8 @@ { if (p || file) { - p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, sizeof(guththila_xml_writer_t)); + p->xsw = (guththila_xml_writer_t *) AXIS2_MALLOC(env->allocator, + sizeof(guththila_xml_writer_t)); p->xsw->writer = guththila_writer_create_for_file(env, file); p->xsw->writer_buffer = guththila_buffer_create(env, GUTHTHILA_BUFFER_SIZE); p->xsw->writer_buffer->buff[0] = 0; @@ -228,7 +229,7 @@ if (p->xsw->writer_buffer->buff) { - ii = strlen(p->xsw->writer_buffer->buff); + ii = p->xsw->next; c = guththila_writer_write(env, p->xsw->writer_buffer->buff, 0, ii, p->xsw->writer); p->xsw->writer_buffer->buff[0] = 0; p->xsw->writer_buffer->buff[1] = 0; @@ -1269,4 +1270,10 @@ buffer = guththila_writer_get_buffer(env, p->xsw->writer); return buffer; +} + +AXIS2_EXTERN unsigned int AXIS2_CALL +guththila_get_memory_buffer_size(axis2_env_t *env, guththila_t *p) +{ + return guththila_writer_get_buffer_size (env, p->xsw->writer); } --------------------------------------------------------------------- To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org For additional commands, e-mail: axis-cvs-help@ws.apache.org