You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by sa...@apache.org on 2005/10/07 06:59:54 UTC

svn commit: r307019 - /webservices/axis2/trunk/c/modules/xml/guththila/src/

Author: samisa
Date: Thu Oct  6 21:59:41 2005
New Revision: 307019

URL: http://svn.apache.org/viewcvs?rev=307019&view=rev
Log:
Naming convention refactoring, changed NAMESPACE to guththila_namespace_t

Modified:
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_errno.h
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_main.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_namespace.h
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.h
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.h
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_errno.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_errno.h?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_errno.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_errno.h Thu Oct  6 21:59:41 2005
@@ -40,9 +40,9 @@
 #define GUTHTHILA_STREAM_WRITER_ERROR_WRITING_TO_STREAM        (GUTHTHILA_START_ERROR + 2)
 #define GUTHTHILA_STREAM_WRITER_ERROR_STREAM_STRUCT_NULL        (GUTHTHILA_START_ERROR + 3)
 #define GUTHTHILA_STREAM_WRITER_ERROR_LOCAL_NAME_NULL        (GUTHTHILA_START_ERROR + 4)
-#define GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NULL        (GUTHTHILA_START_ERROR + 5)
+#define GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NULL        (GUTHTHILA_START_ERROR + 5)
 #define GUTHTHILA_STREAM_WRITER_ERROR_PREFIX_NULL        (GUTHTHILA_START_ERROR + 6)
-#define GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NOT_DECLARED        (GUTHTHILA_START_ERROR + 7)
+#define GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED        (GUTHTHILA_START_ERROR + 7)
 #define GUTHTHILA_STREAM_WRITER_ERROR_ELEMENT_STACK_EMPTY        (GUTHTHILA_START_ERROR + 8)
 #define GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_STATE        (GUTHTHILA_START_ERROR + 9)
 #define GUTHTHILA_STREAM_WRITER_ERROR_COMMENT_NULL        (GUTHTHILA_START_ERROR + 10)

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_main.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_main.c?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_main.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_main.c Thu Oct  6 21:59:41 2005
@@ -1,4 +1,24 @@
+/*
+ *   Copyright 2004,2005 The Apache Software Foundation.
+ *
+ *   Licensed under the Apache License, Version 2.0 (the "License");
+ *   you may not use this file except in compliance with the License.
+ *   You may obtain a copy of the License at
+ *
+ *       http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *   Unless required by applicable law or agreed to in writing, software
+ *   distributed under the License is distributed on an "AS IS" BASIS,
+ *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *   See the License for the specific language governing permissions and
+ *   limitations under the License.
+ *
+ *	
+ * @author Dinesh Premalal (xydinesh@gmail.com, premalwd@cse.mrt.ac.lk)	
+ */
+
 #include "guththila_xml_pull_parser.h"
+
 int main (int argc, char *argv[])
 {
   READER *red;
@@ -77,7 +97,7 @@
 	      }
 	    e = Stack_last (parser->dep);
 	    d = e->depth->count;
-	    NAMESPACE *ns ;
+	    guththila_namespace_t *ns ;
 	    for (; d > 0; d--)
 	      {
 		p = XML_PullParser_getNamespacePrefix_by_number (parser, d);

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_namespace.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_namespace.h?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_namespace.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_namespace.h Thu Oct  6 21:59:41 2005
@@ -18,18 +18,18 @@
  */
 
 
-#ifndef NAMESPACE_H
-#define NAMESPACE_H
+#ifndef GUTHTHILA_NAMESPACE_H
+#define GUTHTHILA_NAMESPACE_H
 #include "guththila_token.h"
 
-typedef struct namespace
+typedef struct guththila_namespace_s
 {
   char *name;
   int length;
   char *uri;
   int lengthuri;
-}NAMESPACE;
+} guththila_namespace_t;
 
 
 
-#endif /* NAMESPACE_H */
+#endif /* GUTHTHILA_NAMESPACE_H */

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.c?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.c Thu Oct  6 21:59:41 2005
@@ -150,7 +150,7 @@
 
 
 int 
-Stack_push_namespace (STACK *stack, NAMESPACE *ns)
+Stack_push_namespace (STACK *stack, guththila_namespace_t *ns)
 {
   if (stack)
     {

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.h?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_stack.h Thu Oct  6 21:59:41 2005
@@ -39,7 +39,7 @@
 {
   guththila_token_t *token;
   guththila_attribute_t *attribute;
-  NAMESPACE *namespace;
+  guththila_namespace_t *namespace;
   guththila_depth_t *depth;
   ELEMENT *prev;
 };
@@ -61,7 +61,7 @@
 void Stack_free_rec (STACK *st, ELEMENT *el);
 ELEMENT *Stack_last (STACK *st);
 ELEMENT *Stack_pull (STACK *st);
-int Stack_push_namespace (STACK *st, NAMESPACE *ns);
+int Stack_push_namespace (STACK *st, guththila_namespace_t *ns);
 ELEMENT *Stack_pull_current (STACK *st);
 int Stack_push_depth (STACK *st, guththila_depth_t *d);
 void Stack_clear (STACK *st);

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.c Thu Oct  6 21:59:41 2005
@@ -890,8 +890,8 @@
 XML_PullParser_addNamespace (XML_PullParser * parser, guththila_token_t * name,
 			     guththila_token_t * uri)
 {
-  NAMESPACE *ns;
-  ns = (NAMESPACE *) malloc (sizeof (NAMESPACE));
+  guththila_namespace_t *ns;
+  ns = (guththila_namespace_t *) malloc (sizeof (guththila_namespace_t));
   ns->name = guththila_token_to_string (name, parser->unicode_state);
   ns->length = strlen (ns->name);
   ns->uri = guththila_token_to_string (uri, parser->unicode_state);
@@ -1058,7 +1058,7 @@
 }
 
 
-NAMESPACE *
+guththila_namespace_t *
 XML_PullParser_getNamespace (XML_PullParser * parser)
 {
   ELEMENT *e;
@@ -1071,7 +1071,7 @@
 
 
 char *
-XML_PullParser_getNamespacePrefix (XML_PullParser * parser, NAMESPACE * ns)
+XML_PullParser_getNamespacePrefix (XML_PullParser * parser, guththila_namespace_t * ns)
 {
   if (ns)
     return strdup (ns->name);
@@ -1081,7 +1081,7 @@
 
 
 char *
-XML_PullParser_getNamespaceUri (XML_PullParser * parser, NAMESPACE * ns)
+XML_PullParser_getNamespaceUri (XML_PullParser * parser, guththila_namespace_t * ns)
 {
   if (ns)
     return strdup (ns->uri);
@@ -1095,7 +1095,7 @@
 {
   int ix = parser->namesp->pointer;
   ELEMENT *e;
-  NAMESPACE *ns = NULL;
+  guththila_namespace_t *ns = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
@@ -1113,7 +1113,7 @@
 {
   int ix = parser->namesp->pointer;
   ELEMENT *e;
-  NAMESPACE *ns = NULL;
+  guththila_namespace_t *ns = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
@@ -1133,7 +1133,7 @@
   int ii;
   int ix = parser->namesp->pointer;
   ELEMENT *e;
-  NAMESPACE *ns = NULL;
+  guththila_namespace_t *ns = NULL;
   att_prefix = XML_PullParser_getAttributePrefix_by_number (parser, i);
     
   for (ii = 0; ii <= ix; ii++)

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.h?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_pull_parser.h Thu Oct  6 21:59:41 2005
@@ -133,10 +133,10 @@
 char *XML_PullParser_getName (XML_PullParser * p);
 char *XML_PullParser_getPrefix (XML_PullParser * p);
 char *XML_PullParser_getValue (XML_PullParser * p);
-NAMESPACE *XML_PullParser_getNamespace (XML_PullParser * p);
+guththila_namespace_t *XML_PullParser_getNamespace (XML_PullParser * p);
 int XML_PullParser_getNamespaceCount (XML_PullParser * p);
-char *XML_PullParser_getNamespaceUri (XML_PullParser * p, NAMESPACE * ns);
-char *XML_PullParser_getNamespacePrefix (XML_PullParser * p, NAMESPACE * ns);
+char *XML_PullParser_getNamespaceUri (XML_PullParser * p, guththila_namespace_t * ns);
+char *XML_PullParser_getNamespacePrefix (XML_PullParser * p, guththila_namespace_t * ns);
 char *XML_PullParser_getNamespacePrefix_by_number (XML_PullParser * p, int i);
 char *XML_PullParser_getNamespaceUri_by_number (XML_PullParser * p, int i);
 char *XML_PullParser_getAttributeNamespace_by_number (XML_PullParser *p, int i);

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c?rev=307019&r1=307018&r2=307019&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_xml_stream_writer.c Thu Oct  6 21:59:41 2005
@@ -115,7 +115,7 @@
     if (!local_name)
         return GUTHTHILA_STREAM_WRITER_ERROR_LOCAL_NAME_NULL;
     if (!namespace_uri)
-        return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NULL;
+        return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NULL;
       
     guththila_xml_stream_writer_end_start_element(stream_writer);
         
@@ -128,7 +128,7 @@
         if (stream_writer->prefix_defaulting)
             prefix = GUTHTHILA_DEFAULT_NS_PREFIX;
         else
-            return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NOT_DECLARED;
+            return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED;
     }
       
     fputs("<", stream_writer->writer);
@@ -169,7 +169,7 @@
     if (!local_name)
         return GUTHTHILA_STREAM_WRITER_ERROR_LOCAL_NAME_NULL;
     if (!namespace_uri)
-        return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NULL;
+        return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NULL;
     if (!prefix)
         return GUTHTHILA_STREAM_WRITER_ERROR_PREFIX_NULL;
     
@@ -328,7 +328,7 @@
                 guththila_xml_stream_writer_write_namespace(stream_writer, prefix, namespace_uri);
             }
             else
-                return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NOT_DECLARED;
+                return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED;
         }
 
         fputs(" ", stream_writer->writer);
@@ -357,10 +357,10 @@
             if (stream_writer->prefix_defaulting)
                 guththila_xml_stream_writer_write_namespace(stream_writer, prefix, namespace_uri);
             else
-                return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NOT_DECLARED;
+                return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED;
         }
         else if (strcmp(current_prefix, prefix) != 0 )
-            return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NOT_DECLARED;
+            return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED;
 
         fputs(" ", stream_writer->writer);
 
@@ -576,7 +576,7 @@
             return GUTHTHILA_STREAM_WRITER_ERROR_PREFIX_NULL;
 
         if (!uri)
-            return GUTHTHILA_STREAM_WRITER_ERROR_NAMESPACE_NULL;
+            return GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NULL;
     
         if ( strcmp(prefix, "xml") == 0 || strcmp (prefix, "xmlns") == 0)
             return GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_PREFIX;