axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r307048 - in /webservices/axis2/trunk/c/modules/xml/guththila/src: guththila_errno.h guththila_main.c guththila_xml_pull_parser.c guththila_xml_pull_parser.h guththila_xml_stream_writer.c
Date Fri, 07 Oct 2005 08:09:37 GMT
Author: samisa
Date: Fri Oct  7 01:09:27 2005
New Revision: 307048

URL: http://svn.apache.org/viewcvs?rev=307048&view=rev
Log:
Moew pull parser naming convention related fixes

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_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=307048&r1=307047&r2=307048&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 Fri Oct  7 01:09:27
2005
@@ -36,7 +36,7 @@
 /*
  * Error Codes
  */
-#define GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_START_guththila_element_t        (GUTHTHILA_START_ERROR
+ 1)
+#define GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_GUTHTHILA_START_ELEMENT        (GUTHTHILA_START_ERROR
+ 1)
 #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)
@@ -45,8 +45,8 @@
 #define GUTHTHILA_STREAM_WRITER_ERROR_guththila_namespace_t_NOT_DECLARED        (GUTHTHILA_START_ERROR
+ 7)
 #define GUTHTHILA_STREAM_WRITER_ERROR_guththila_element_t_guththila_stack_t_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)
-#define GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_COMMENT        (GUTHTHILA_START_ERROR + 11)
+#define GUTHTHILA_STREAM_WRITER_ERROR_GUTHTHILA_COMMENT_NULL        (GUTHTHILA_START_ERROR
+ 10)
+#define GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_GUTHTHILA_COMMENT        (GUTHTHILA_START_ERROR
+ 11)
 #define GUTHTHILA_STREAM_WRITER_ERROR_PROCESSING_INSTRUCTION_TARGET_NULL        (GUTHTHILA_START_ERROR
+ 12)
 #define GUTHTHILA_STREAM_WRITER_ERROR_CDATA_NULL        (GUTHTHILA_START_ERROR + 13)
 #define GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_CDATA        (GUTHTHILA_START_ERROR + 14)

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=307048&r1=307047&r2=307048&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 Fri Oct  7 01:09:27
2005
@@ -31,7 +31,7 @@
     {
       switch (c)
 	{
-	case START_DOCUMENT :
+	case GUTHTHILA_START_DOCUMENT :
 	  {
 	    printf ("<?xml ");
 	    int ix;
@@ -51,8 +51,8 @@
 	    printf ("?>");
 	  }
 	  break;
-	case START_guththila_element_t:
-	case EMPTY_guththila_element_t:
+	case GUTHTHILA_START_ELEMENT:
+	case GUTHTHILA_EMPTY_ELEMENT:
 	  {
 	    printf ("<");
 	    int ia;
@@ -109,13 +109,13 @@
 		printf ("%s\" ", p);
 		free (p);
 		}
-	    if (EVENT == START_guththila_element_t)
+	    if (guththila_event == GUTHTHILA_START_ELEMENT)
 	      printf (">");
 	    else
 	      printf ("/>");
 	  }
 	  break;
-	  case END_guththila_element_t:
+	  case GUTHTHILA_END_ELEMENT:
 	  {
 	    printf ("</");
 	    char *p;
@@ -131,7 +131,7 @@
 	    printf (">");
 	  }
 	  break;
-	case CHARACTER:
+	case GUTHTHILA_CHARACTER:
 	  {
 	  char *p;
 	  p = guththila_xml_pull_parser_get_value (parser);
@@ -139,7 +139,7 @@
 	  free (p);
 	  }
 	  break;
-	case COMMENT:
+	case GUTHTHILA_COMMENT:
 	  break;
 	};
     }

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=307048&r1=307047&r2=307048&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 Fri Oct
 7 01:09:27 2005
@@ -36,7 +36,7 @@
   parser->_next = 0;
   parser->offset = 0;
   parser->last = -1;
-  parser->STATUS = S_1;
+  parser->status = S_1;
   parser->unicode_state = None;
   return parser;
 }
@@ -374,7 +374,7 @@
 	  if ('>' != guththila_xml_pull_parser_next_char(parser, 0))
 	    guththila_xml_pull_parser_exception (p_FILE, LINE);
 	  else
-	    EVENT = START_DOCUMENT;
+	    guththila_event = GUTHTHILA_START_DOCUMENT;
 	}
     }
   else
@@ -392,7 +392,7 @@
   parser->value = NULL;
   guththila_stack_clear (parser->attrib);
   guththila_stack_clear (parser->stack);
-  if (EVENT == END_guththila_element_t || EVENT == EMPTY_guththila_element_t)
+  if (guththila_event == GUTHTHILA_END_ELEMENT || guththila_event == GUTHTHILA_EMPTY_ELEMENT)
     guththila_xml_pull_parser_close_element (parser);
 }
 
@@ -490,12 +490,12 @@
   int c;
   c = guththila_xml_pull_parser_process_name (parser);
   c = guththila_xml_pull_parser_skip_spaces (parser, c);
-  EVENT = START_guththila_element_t;
+  guththila_event = GUTHTHILA_START_ELEMENT;
   for (;;)
     {
       if ('/' == c)
 	{
-	  EVENT = EMPTY_guththila_element_t;
+	  guththila_event = GUTHTHILA_EMPTY_ELEMENT;
 	  if ('>' == guththila_xml_pull_parser_next_char(parser, 0))
 	    return c;
 	  else
@@ -514,7 +514,7 @@
 {
   int c;
   int ref = 0;
-  EVENT = CHARACTER;
+  guththila_event = GUTHTHILA_CHARACTER;
   guththila_xml_pull_parser_open_token (parser);
   do
     {
@@ -543,7 +543,7 @@
   c = guththila_xml_pull_parser_process_name (parser);
   c = guththila_xml_pull_parser_skip_spaces (parser, c);
   if ('>' == c)
-    EVENT = END_guththila_element_t;
+    guththila_event = GUTHTHILA_END_ELEMENT;
   else
     guththila_xml_pull_parser_exception (p_FILE, LINE);
   return c;
@@ -554,7 +554,7 @@
 guththila_xml_pull_parser_process_pi (guththila_xml_pull_parser_t * parser)
 {
   int c;
-  EVENT = COMMENT;
+  guththila_event = GUTHTHILA_COMMENT;
   c = guththila_xml_pull_parser_next_char(parser, 0);
   while ('<' != c)
     c = guththila_xml_pull_parser_next_char(parser, 0);
@@ -580,7 +580,7 @@
 		{
 		  if ('>' == guththila_xml_pull_parser_next_char(parser, 0))
 		    {
-		      EVENT = COMMENT;
+		      guththila_event = GUTHTHILA_COMMENT;
 		      while ('<' != c)
 			{
 			  c = guththila_xml_pull_parser_next_char(parser, -1);
@@ -615,55 +615,55 @@
       if (c == -1)
 	return -1;
 
-      switch (parser->STATUS)
+      switch (parser->status)
 	{
 	case S_1:
 	  if ('<' == c)
-	    parser->STATUS = S_2;
+	    parser->status = S_2;
 	  else
-	    parser->STATUS = S_0;
+	    parser->status = S_0;
 	  break;
 	case S_2:
 	  {
 	    if ('?' == c)
 	      {
 		guththila_xml_pull_parser_process_xml_decl (parser);
-		parser->STATUS = S_3;
+		parser->status = S_3;
 	      }
 	    else if ('!' == c)
 	      {
 		guththila_xml_pull_parser_process_comment (parser);
-		parser->STATUS = S_4;
+		parser->status = S_4;
 	      }
 	    else
 	      {
 		guththila_xml_pull_parser_processSTagOrEmptyElem (parser);
-		parser->STATUS = S_3;
+		parser->status = S_3;
 	      }
 	  }
 	  break;
 	case S_3:
 	  if ('<' == c)
-	    parser->STATUS = S_4;
+	    parser->status = S_4;
 	  else
 	    {
 	      c = guththila_xml_pull_parser_process_char_data (parser);
 	      if ('<' == c)
 		{
-		  parser->STATUS = S_4;
-		  return EVENT;
+		  parser->status = S_4;
+		  return guththila_event;
 		}
 	      else if ('\0' == c)
-		parser->STATUS = S_3;
+		parser->status = S_3;
 	      else
-		parser->STATUS = S_0;
+		parser->status = S_0;
 	    }
 	  break;
 	case S_4:
 	  if ('/' == c)
 	    {
 	      guththila_xml_pull_parser_process_empty_tag (parser);
-	      parser->STATUS = S_3;
+	      parser->status = S_3;
 	    }
 	  else if ('?' == c)
 	    guththila_xml_pull_parser_process_pi (parser);
@@ -672,15 +672,15 @@
 	  else
 	    {
 	      guththila_xml_pull_parser_processSTagOrEmptyElem (parser);
-	      parser->STATUS = S_3;
+	      parser->status = S_3;
 	    }
 	  break;
 	case S_0:
 	  guththila_xml_pull_parser_exception (p_FILE, LINE);
 	}
     }
-  while (parser->STATUS != S_3);
-  return EVENT;
+  while (parser->status != S_3);
+  return guththila_event;
 }
 
 
@@ -695,7 +695,7 @@
     case -1:
       return -1;
 
-    case START_DOCUMENT:
+    case GUTHTHILA_START_DOCUMENT:
       {
 	int ix;
 	guththila_element_t *e;
@@ -716,8 +716,8 @@
 	  }
       }
       break;
-    case START_guththila_element_t:
-    case EMPTY_guththila_element_t:
+    case GUTHTHILA_START_ELEMENT:
+    case GUTHTHILA_EMPTY_ELEMENT:
       {
 	int is = 0;
 	guththila_element_t *e;
@@ -782,7 +782,7 @@
 	guththila_xml_pull_parser_open_element (parser);
       }
       break;
-    case END_guththila_element_t:
+    case GUTHTHILA_END_ELEMENT:
       {
 	guththila_element_t *e;
 	e = guththila_stack_pull (parser->stack);
@@ -793,20 +793,20 @@
 	  parser->prefix = e->token;
       }
       break;
-    case CHARACTER:
+    case GUTHTHILA_CHARACTER:
       {
 	guththila_element_t *e;
 	e = guththila_stack_pull (parser->stack);
 	parser->value = e->token;
       }
       break;
-    case ENTITY_REFERANCE:
+    case GUTHTHILA_ENTITY_REFERANCE:
       break;
-    case COMMENT:
+    case GUTHTHILA_COMMENT:
       break;
 
     };
-  return EVENT;
+  return guththila_event;
 }
 
 

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=307048&r1=307047&r2=307048&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 Fri Oct
 7 01:09:27 2005
@@ -41,7 +41,7 @@
  *   throwing Xml_PullParser_Exception
  */
 
-enum status
+enum guththila_status
 {
   S_0 = 0,
   S_1,
@@ -50,17 +50,17 @@
   S_4
 };
 
-enum event_types
+enum guththila_event_types
 {
-  START_DOCUMENT = 10,
-  START_guththila_element_t = 20,
-  END_guththila_element_t = 30,
-  EMPTY_guththila_element_t = 40,
-  CHARACTER = 50,
-  ENTITY_REFERANCE = 60,
-  COMMENT = 70
+  GUTHTHILA_START_DOCUMENT = 10,
+  GUTHTHILA_START_ELEMENT = 20,
+  GUTHTHILA_END_ELEMENT = 30,
+  GUTHTHILA_EMPTY_ELEMENT = 40,
+  GUTHTHILA_CHARACTER = 50,
+  GUTHTHILA_ENTITY_REFERANCE = 60,
+  GUTHTHILA_COMMENT = 70
 };
-enum event_types EVENT;
+enum guththila_event_types guththila_event;
 
 
 typedef struct guththila_xml_pull_parser_s
@@ -78,7 +78,7 @@
   int offset;
   int last;
   int unicode_state;
-  enum status STATUS;
+  enum guththila_status status;
 } guththila_xml_pull_parser_t;
 
 

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=307048&r1=307047&r2=307048&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 Fri
Oct  7 01:09:27 2005
@@ -53,7 +53,7 @@
     if (!stream_writer)
         return GUTHTHILA_STREAM_WRITER_ERROR_STREAM_STRUCT_NULL;
     if (!stream_writer->in_start_element)
-        return GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_START_guththila_element_t;
+        return GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_GUTHTHILA_START_ELEMENT;
     if (stream_writer->empty_element)
     {
         if (fputs("/", stream_writer->writer) == EOF)
@@ -416,14 +416,14 @@
         guththila_xml_stream_writer_end_start_element(stream_writer);
 
         if (!data)
-            return GUTHTHILA_STREAM_WRITER_ERROR_COMMENT_NULL;
+            return GUTHTHILA_STREAM_WRITER_ERROR_GUTHTHILA_COMMENT_NULL;
 
         char* ptr = data;
         while (*ptr)
         {
             if (*ptr++ == '-')
                 if (*ptr == '-')
-                    return GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_COMMENT;
+                    return GUTHTHILA_STREAM_WRITER_ERROR_ILLEGAL_GUTHTHILA_COMMENT;
         }
         
         fputs("<!--", stream_writer->writer);



Mime
View raw message