axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject svn commit: r307028 - in /webservices/axis2/trunk/c/modules/xml/guththila/src: guththila_errno.h guththila_main.c guththila_stack.c guththila_stack.h guththila_xml_pull_parser.c guththila_xml_pull_parser.h guththila_xml_stream_writer.c
Date Fri, 07 Oct 2005 06:11:23 GMT
Author: samisa
Date: Thu Oct  6 23:11:11 2005
New Revision: 307028

URL: http://svn.apache.org/viewcvs?rev=307028&view=rev
Log:
Changed the STACK naming convetions

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_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=307028&r1=307027&r2=307028&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 23:11:11
2005
@@ -36,14 +36,14 @@
 /*
  * Error Codes
  */
-#define GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_START_ELEMENT        (GUTHTHILA_START_ERROR
+ 1)
+#define GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_START_guththila_element_t        (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)
 #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_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_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)

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=307028&r1=307027&r2=307028&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 23:11:11
2005
@@ -51,8 +51,8 @@
 	    printf ("?>");
 	  }
 	  break;
-	case START_ELEMENT:
-	case EMPTY_ELEMENT:
+	case START_guththila_element_t:
+	case EMPTY_guththila_element_t:
 	  {
 	    printf ("<");
 	    int ia;
@@ -67,7 +67,7 @@
 	    p = XML_PullParser_getName (parser);
 	    printf ("%s", p);
 	    free (p);
-	    ELEMENT *e;
+	    guththila_element_t *e;
 	    ia = XML_PullParser_getAttributeCount (parser);
 	    for ( ; ia > 0; ia--)
 	      {
@@ -95,7 +95,7 @@
 		    free (p);
 		  }
 	      }
-	    e = Stack_last (parser->dep);
+	    e = guththila_stack_last (parser->dep);
 	    d = e->depth->count;
 	    guththila_namespace_t *ns ;
 	    for (; d > 0; d--)
@@ -109,13 +109,13 @@
 		printf ("%s\" ", p);
 		free (p);
 		}
-	    if (EVENT == START_ELEMENT)
+	    if (EVENT == START_guththila_element_t)
 	      printf (">");
 	    else
 	      printf ("/>");
 	  }
 	  break;
-	  case END_ELEMENT:
+	  case END_guththila_element_t:
 	  {
 	    printf ("</");
 	    char *p;

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=307028&r1=307027&r2=307028&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 23:11:11
2005
@@ -20,10 +20,10 @@
 
 #include "guththila_stack.h"
 
-STACK *
-Stack_createStack ()
+guththila_stack_t *
+guththila_stack_create ()
 {
-  STACK *st = (STACK *) malloc (sizeof (STACK));
+  guththila_stack_t *st = (guththila_stack_t *) malloc (sizeof (guththila_stack_t));
   if (st)
     {
       st->pointer = 0;
@@ -38,11 +38,11 @@
 
 
 int 
-Stack_push (STACK *stack, guththila_token_t *tok, guththila_attribute_t *attr)
+guththila_stack_push (guththila_stack_t *stack, guththila_token_t *tok, guththila_attribute_t
*attr)
 {
   if (stack)
     {
-      ELEMENT *e = (ELEMENT *) malloc (sizeof (ELEMENT));
+      guththila_element_t *e = (guththila_element_t *) malloc (sizeof (guththila_element_t));
       e->token = tok;
       e->attribute = attr;
       if (stack->pointer == 0)
@@ -69,7 +69,7 @@
 
 
 int
-Stack_size (STACK *stack)
+guththila_stack_size (guththila_stack_t *stack)
 {
   if (stack->pointer)
     return stack->pointer;
@@ -79,12 +79,12 @@
 
 
 void 
-Stack_free (STACK *stack)
+guththila_stack_free (guththila_stack_t *stack)
 {
   if (stack && (stack->pointer > 0))
     {
-      ELEMENT *ele = stack->tail;
-      Stack_free_rec (stack, ele);
+      guththila_element_t *ele = stack->tail;
+      guththila_stack_free_rec (stack, ele);
       free (ele);
       free (stack);
     }
@@ -92,7 +92,7 @@
 
 
 void
-Stack_free_rec (STACK *stack, ELEMENT *elem)
+guththila_stack_free_rec (guththila_stack_t *stack, guththila_element_t *elem)
 {
   if (elem->prev == NULL)
     {
@@ -101,14 +101,14 @@
   else 
     {
       elem = elem->prev;
-      Stack_free_rec (stack, elem);
+      guththila_stack_free_rec (stack, elem);
       free (elem);
     }
 }
 
 
-ELEMENT *
-Stack_last (STACK *stack)
+guththila_element_t *
+guththila_stack_last (guththila_stack_t *stack)
 {
   if (stack)
     return stack->tail;
@@ -117,10 +117,10 @@
 }
 
 
-ELEMENT *
-Stack_pull (STACK *stack)
+guththila_element_t *
+guththila_stack_pull (guththila_stack_t *stack)
 {
-  ELEMENT *e;
+  guththila_element_t *e;
   if (stack)
     {
       e = stack->tail;
@@ -150,11 +150,11 @@
 
 
 int 
-Stack_push_namespace (STACK *stack, guththila_namespace_t *ns)
+guththila_stack_push_namespace (guththila_stack_t *stack, guththila_namespace_t *ns)
 {
   if (stack)
     {
-      ELEMENT *e = (ELEMENT *) malloc (sizeof (ELEMENT));
+      guththila_element_t *e = (guththila_element_t *) malloc (sizeof (guththila_element_t));
       e->namespace = ns;
       e->attribute = NULL;
       e->token = NULL;
@@ -181,10 +181,10 @@
 }
 
 
-ELEMENT *
-Stack_pull_current (STACK *stack)
+guththila_element_t *
+guththila_stack_pull_current (guththila_stack_t *stack)
 {
-  ELEMENT *e;
+  guththila_element_t *e;
   e = stack->current;
   if (stack->current_pos != 0)
     {
@@ -204,11 +204,11 @@
 
 
 int 
-Stack_push_depth (STACK *stack, guththila_depth_t *d)
+guththila_stack_push_depth (guththila_stack_t *stack, guththila_depth_t *d)
 {
   if (stack)
     {
-      ELEMENT *e = (ELEMENT *) malloc (sizeof (ELEMENT));
+      guththila_element_t *e = (guththila_element_t *) malloc (sizeof (guththila_element_t));
       e->namespace = NULL;
       e->attribute = NULL;
       e->token = NULL;
@@ -237,21 +237,21 @@
 
 
 void
-Stack_clear (STACK *stack)
+guththila_stack_clear (guththila_stack_t *stack)
 {
-  ELEMENT *e; 
+  guththila_element_t *e; 
   e = stack->tail;
   if (e)
     {
-      Stack_pull (stack);
+      guththila_stack_pull (stack);
       e = stack->tail;
     }
   stack->pointer = 0 ;
 }
 
 
-ELEMENT *
-Stack_get (STACK *stack , int i)
+guththila_element_t *
+guththila_stack_get (guththila_stack_t *stack , int i)
 {
   if (i)
     {
@@ -259,7 +259,7 @@
         return stack->tail;
       else
         {
-          ELEMENT *e;
+          guththila_element_t *e;
           int ix = stack->pointer;
           e = stack->tail;
           for ( ; ix > ((stack->pointer+1) - i); ix--)

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=307028&r1=307027&r2=307028&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 23:11:11
2005
@@ -18,54 +18,54 @@
  */
 
 
-#ifndef STACK_H
-#define STACK_H
+#ifndef GUTHTHILA_STACK_H
+#define GUTHTHILA_STACK_H
 
 #include "guththila_token.h"
 #include "guththila_attribute.h"
 #include "guththila_namespace.h"
 #include "guththila_depth.h"
 
-enum element_types
+enum guththila_element_types
   {
     token_element,
     attribute_element,
     namespace_element
   };
 
-typedef struct element ELEMENT;
+typedef struct guththila_element_s guththila_element_t;
 
-typedef struct element
+struct guththila_element_s
 {
   guththila_token_t *token;
   guththila_attribute_t *attribute;
   guththila_namespace_t *namespace;
   guththila_depth_t *depth;
-  ELEMENT *prev;
+  guththila_element_t *prev;
 };
 
-typedef struct stack
+typedef struct guththila_stack_s
 {
-  enum element_types ELEMENT_TYPE; 
+  enum guththila_element_types element_type; 
   int pointer;
   int current_pos;
-  ELEMENT *tail;
-  ELEMENT *current;
-}STACK;
+  guththila_element_t *tail;
+  guththila_element_t *current;
+} guththila_stack_t;
 
 /* stack implementation */
-STACK *Stack_createStack ();
-int Stack_push (STACK *st, guththila_token_t *tok, guththila_attribute_t *attr);
-int Stack_size (STACK *st);
-void Stack_free (STACK *st);
-void Stack_free_rec (STACK *st, ELEMENT *el);
-ELEMENT *Stack_last (STACK *st);
-ELEMENT *Stack_pull (STACK *st);
-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);
-ELEMENT *Stack_get (STACK *st, int i);
+guththila_stack_t *guththila_stack_create ();
+int guththila_stack_push (guththila_stack_t *st, guththila_token_t *tok, guththila_attribute_t
*attr);
+int guththila_stack_size (guththila_stack_t *st);
+void guththila_stack_free (guththila_stack_t *st);
+void guththila_stack_free_rec (guththila_stack_t *st, guththila_element_t *el);
+guththila_element_t *guththila_stack_last (guththila_stack_t *st);
+guththila_element_t *guththila_stack_pull (guththila_stack_t *st);
+int guththila_stack_push_namespace (guththila_stack_t *st, guththila_namespace_t *ns);
+guththila_element_t *guththila_stack_pull_current (guththila_stack_t *st);
+int guththila_stack_push_depth (guththila_stack_t *st, guththila_depth_t *d);
+void guththila_stack_clear (guththila_stack_t *st);
+guththila_element_t *guththila_stack_get (guththila_stack_t *st, int i);
 
 
-#endif /* STACK_H */
+#endif /* GUTHTHILA_STACK_H */

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=307028&r1=307027&r2=307028&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 23:11:11 2005
@@ -25,10 +25,10 @@
   XML_PullParser *parser =
     (XML_PullParser *) malloc (sizeof (XML_PullParser));
   parser->buffer = guththila_buffer_create (1024);
-  parser->stack = Stack_createStack ();
-  parser->attrib = Stack_createStack ();
-  parser->namesp = Stack_createStack ();
-  parser->dep = Stack_createStack ();
+  parser->stack = guththila_stack_create ();
+  parser->attrib = guththila_stack_create ();
+  parser->namesp = guththila_stack_create ();
+  parser->dep = guththila_stack_create ();
   parser->name = (guththila_token_t *) malloc (sizeof (guththila_token_t));
   parser->prefix = (guththila_token_t *) malloc (sizeof (guththila_token_t));
   parser->value = (guththila_token_t *) malloc (sizeof (guththila_token_t));
@@ -50,13 +50,13 @@
   if (parser->reader)
     free (parser->reader);
   if (parser->stack)
-    Stack_free (parser->stack);
+    guththila_stack_free (parser->stack);
   if (parser->attrib)
-    Stack_free (parser->attrib);
+    guththila_stack_free (parser->attrib);
   if (parser->namesp)
-    Stack_free (parser->namesp);
+    guththila_stack_free (parser->namesp);
   if (parser->dep)
-    Stack_free (parser->dep);
+    guththila_stack_free (parser->dep);
   free ((void *) parser);
 }
 
@@ -72,10 +72,10 @@
 void
 XML_PullParser_relocateTokens (XML_PullParser * parser, int offset)
 {
-  ELEMENT *el;
+  guththila_element_t *el;
   int isize;
-  isize = Stack_size (parser->stack);
-  el = Stack_last (parser->stack);
+  isize = guththila_stack_size (parser->stack);
+  el = guththila_stack_last (parser->stack);
   for (; isize > 0; isize--)
     {
       guththila_token_relocate (el->token, offset);
@@ -197,14 +197,14 @@
   guththila_token_t *t = (guththila_token_t *) malloc (sizeof (guththila_token_t));
   t->type = Unknown;
   t->start = XML_PullParser_lastChar (parser);
-  Stack_push (parser->stack, t, NULL);
+  guththila_stack_push (parser->stack, t, NULL);
 }
 
 
 void
 XML_PullParser_closeToken (XML_PullParser * parser, int t, int refer)
 {
-  ELEMENT *e = Stack_last (parser->stack);
+  guththila_element_t *e = guththila_stack_last (parser->stack);
   e->token->type = t;
   e->token->ref = refer;
   e->token->end = XML_PullParser_lastChar (parser) - 1;
@@ -390,9 +390,9 @@
   parser->name = NULL;
   parser->prefix = NULL;
   parser->value = NULL;
-  Stack_clear (parser->attrib);
-  Stack_clear (parser->stack);
-  if (EVENT == END_ELEMENT || EVENT == EMPTY_ELEMENT)
+  guththila_stack_clear (parser->attrib);
+  guththila_stack_clear (parser->stack);
+  if (EVENT == END_guththila_element_t || EVENT == EMPTY_guththila_element_t)
     XML_PullParser_closeElement (parser);
 }
 
@@ -490,12 +490,12 @@
   int c;
   c = XML_PullParser_processName (parser);
   c = XML_PullParser_skipS (parser, c);
-  EVENT = START_ELEMENT;
+  EVENT = START_guththila_element_t;
   for (;;)
     {
       if ('/' == c)
 	{
-	  EVENT = EMPTY_ELEMENT;
+	  EVENT = EMPTY_guththila_element_t;
 	  if ('>' == XML_PullParser_nextChar (parser, 0))
 	    return c;
 	  else
@@ -543,7 +543,7 @@
   c = XML_PullParser_processName (parser);
   c = XML_PullParser_skipS (parser, c);
   if ('>' == c)
-    EVENT = END_ELEMENT;
+    EVENT = END_guththila_element_t;
   else
     XML_PullParser_Exception (p_FILE, LINE);
   return c;
@@ -698,17 +698,17 @@
     case START_DOCUMENT:
       {
 	int ix;
-	ELEMENT *e;
+	guththila_element_t *e;
 	guththila_token_t *att_name;
 	guththila_token_t *att_value;
-	ix = Stack_size (parser->stack);
+	ix = guththila_stack_size (parser->stack);
 	for (; ix > 0; ix--)
 	  {
-	    e = Stack_pull (parser->stack);
+	    e = guththila_stack_pull (parser->stack);
 	    if (e->token->type == AttValue)
 	      {
 		att_value = e->token;
-		e = Stack_pull (parser->stack);
+		e = guththila_stack_pull (parser->stack);
 		ix--;
 		att_name = e->token;
 		XML_PullParser_addAttribute (parser, att_name, att_value);
@@ -716,23 +716,23 @@
 	  }
       }
       break;
-    case START_ELEMENT:
-    case EMPTY_ELEMENT:
+    case START_guththila_element_t:
+    case EMPTY_guththila_element_t:
       {
 	int is = 0;
-	ELEMENT *e;
+	guththila_element_t *e;
 	guththila_token_t *name = NULL;
 	guththila_token_t *value = NULL;
-	is = Stack_size (parser->stack);
-	for (; is > 0 && Stack_size (parser->stack); is--)
+	is = guththila_stack_size (parser->stack);
+	for (; is > 0 && guththila_stack_size (parser->stack); is--)
 	  {
-	    e = Stack_pull (parser->stack);
+	    e = guththila_stack_pull (parser->stack);
 	    /* be careful about memory leaks, when we pull it we get
 	       seperate Element need to free it properly */
 	    if (e->token->type == AttValue)
 	      {
 		value = e->token;
-		e = Stack_pull (parser->stack);
+		e = guththila_stack_pull (parser->stack);
 		is--;
 		name = e->token;
 		if (!guththila_token_compare
@@ -750,11 +750,11 @@
 	      }
 	    else if (e->token->type == Prefix)
 	      {
-		ELEMENT *ex;
+		guththila_element_t *ex;
 		if (!guththila_token_compare
 		    (e->token, "xmlns", 5, parser->unicode_state))
 		  {
-		    ex = Stack_pull (parser->attrib);
+		    ex = guththila_stack_pull (parser->attrib);
 		    XML_PullParser_addNamespace (parser, ex->attribute->name,
 						 ex->attribute->value);
 		  }
@@ -764,7 +764,7 @@
 		      parser->prefix = e->token;
 		    else
 		      {
-			ex = Stack_pull (parser->attrib);
+			ex = guththila_stack_pull (parser->attrib);
 			XML_PullParser_addAttribute_with_prefix (parser,
 								 e->token,
 								 ex->
@@ -782,21 +782,21 @@
 	XML_PullParser_openElement (parser);
       }
       break;
-    case END_ELEMENT:
+    case END_guththila_element_t:
       {
-	ELEMENT *e;
-	e = Stack_pull (parser->stack);
+	guththila_element_t *e;
+	e = guththila_stack_pull (parser->stack);
 	if (e->token->type == Name)
 	  parser->name = e->token;
-	e = Stack_pull (parser->stack);
+	e = guththila_stack_pull (parser->stack);
 	if (e->token->type == Prefix)
 	  parser->prefix = e->token;
       }
       break;
     case CHARACTER:
       {
-	ELEMENT *e;
-	e = Stack_pull (parser->stack);
+	guththila_element_t *e;
+	e = guththila_stack_pull (parser->stack);
 	parser->value = e->token;
       }
       break;
@@ -816,23 +816,23 @@
   int ii;
   guththila_depth_t *m = (guththila_depth_t *) malloc (sizeof (guththila_depth_t));
   guththila_depth_t *l = NULL;
-  ELEMENT *e;
-  ii = Stack_size (parser->dep);
+  guththila_element_t *e;
+  ii = guththila_stack_size (parser->dep);
   if (!ii)
     {
       m->first = 0;
-      m->total = Stack_size (parser->namesp);
+      m->total = guththila_stack_size (parser->namesp);
       m->count = m->total;
-      Stack_push_depth (parser->dep, m);
+      guththila_stack_push_depth (parser->dep, m);
     }
   else
     {
-      e = Stack_pull_current (parser->dep);
+      e = guththila_stack_pull_current (parser->dep);
       l = e->depth;
       m->first = l->first + l->count;
-      m->total = Stack_size (parser->namesp);
+      m->total = guththila_stack_size (parser->namesp);
       m->count = m->total - l->total;
-      Stack_push_depth (parser->dep, m);
+      guththila_stack_push_depth (parser->dep, m);
     }
 }
 
@@ -840,14 +840,14 @@
 void
 XML_PullParser_closeElement (XML_PullParser * parser)
 {
-  ELEMENT *d;
-  ELEMENT *e;
+  guththila_element_t *d;
+  guththila_element_t *e;
   int ii;
-  d = Stack_pull (parser->dep);
+  d = guththila_stack_pull (parser->dep);
   ii = d->depth->count;
   for (; ii > 0; ii--)
     {
-      e = Stack_pull (parser->namesp);
+      e = guththila_stack_pull (parser->namesp);
       if (e->namespace->name)
 	free (e->namespace->name);
       if (e->namespace->uri)
@@ -867,7 +867,7 @@
   att->name = name;
   att->value = value;
   att->prefix = NULL;
-  Stack_push (parser->attrib, NULL, att);
+  guththila_stack_push (parser->attrib, NULL, att);
 }
 
 
@@ -881,7 +881,7 @@
   att->name = name;
   att->value = value;
   att->prefix = prefix;
-  Stack_push (parser->attrib, NULL, att);
+  guththila_stack_push (parser->attrib, NULL, att);
   /* Element can keep , tokens and attributes here token set to null */
 }
 
@@ -896,22 +896,22 @@
   ns->length = strlen (ns->name);
   ns->uri = guththila_token_to_string (uri, parser->unicode_state);
   ns->lengthuri = strlen (ns->uri);
-  Stack_push_namespace (parser->namesp, ns);
+  guththila_stack_push_namespace (parser->namesp, ns);
 }
 
 
 int
 XML_PullParser_getAttributeCount (XML_PullParser * parser)
 {
-  return Stack_size (parser->attrib);
+  return guththila_stack_size (parser->attrib);
 }
 
 
 guththila_attribute_t *
 XML_PullParser_getAttribute (XML_PullParser * parser)
 {
-  ELEMENT *e;
-  e = Stack_pull (parser->attrib);
+  guththila_element_t *e;
+  e = guththila_stack_pull (parser->attrib);
   if (e->attribute)
     return e->attribute;
   else
@@ -956,13 +956,13 @@
 XML_PullParser_getAttributePrefix_by_number (XML_PullParser * parser, int i)
 {
   int ix = parser->attrib->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_attribute_t *att = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
     {
-      e = Stack_last (parser->attrib);
+      e = guththila_stack_last (parser->attrib);
       for (; ix > i; ix--)
 	{
 	  if (e->prev)
@@ -979,13 +979,13 @@
 XML_PullParser_getAttributeName_by_number (XML_PullParser * parser, int i)
 {
   int ix = parser->attrib->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_attribute_t *att = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
     {
-      e = Stack_last (parser->attrib);
+      e = guththila_stack_last (parser->attrib);
       for (; ix > i; ix--)
 	{
 	  if (e->prev)
@@ -1002,13 +1002,13 @@
 XML_PullParser_getAttributeValue_by_number (XML_PullParser * parser, int i)
 {
   int ix = parser->attrib->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_attribute_t *att = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
     {
-      e = Stack_last (parser->attrib);
+      e = guththila_stack_last (parser->attrib);
       for (; ix > i; ix--)
 	{
 	  if (e->prev)
@@ -1052,7 +1052,7 @@
 XML_PullParser_getNamespaceCount (XML_PullParser * parser)
 {
   if (parser->namesp)
-    return Stack_size (parser->namesp);
+    return guththila_stack_size (parser->namesp);
   else
     return 0;
 }
@@ -1061,8 +1061,8 @@
 guththila_namespace_t *
 XML_PullParser_getNamespace (XML_PullParser * parser)
 {
-  ELEMENT *e;
-  e = Stack_pull_current (parser->namesp);
+  guththila_element_t *e;
+  e = guththila_stack_pull_current (parser->namesp);
   if (e->namespace)
     return e->namespace;
   else
@@ -1094,13 +1094,13 @@
 XML_PullParser_getNamespacePrefix_by_number (XML_PullParser * parser, int i)
 {
   int ix = parser->namesp->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_namespace_t *ns = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
     {
-      e = Stack_get (parser->namesp, i);
+      e = guththila_stack_get (parser->namesp, i);
       if (e->namespace)
 	ns = e->namespace;
     }
@@ -1112,13 +1112,13 @@
 XML_PullParser_getNamespaceUri_by_number (XML_PullParser * parser, int i)
 {
   int ix = parser->namesp->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_namespace_t *ns = NULL;
   if (i > ix)
     XML_PullParser_Exception (p_FILE, LINE);
   else
     {
-      e = Stack_get (parser->namesp, i);
+      e = guththila_stack_get (parser->namesp, i);
       if (e->namespace)
 	ns = e->namespace;
     }
@@ -1132,13 +1132,13 @@
   char *att_prefix;
   int ii;
   int ix = parser->namesp->pointer;
-  ELEMENT *e;
+  guththila_element_t *e;
   guththila_namespace_t *ns = NULL;
   att_prefix = XML_PullParser_getAttributePrefix_by_number (parser, i);
     
   for (ii = 0; ii <= ix; ii++)
     {
-      e = Stack_get (parser->namesp, ii);
+      e = guththila_stack_get (parser->namesp, ii);
       if (e)
 	{
 	  if (e->namespace && att_prefix)

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=307028&r1=307027&r2=307028&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 23:11:11 2005
@@ -53,9 +53,9 @@
 enum event_types
 {
   START_DOCUMENT = 10,
-  START_ELEMENT = 20,
-  END_ELEMENT = 30,
-  EMPTY_ELEMENT = 40,
+  START_guththila_element_t = 20,
+  END_guththila_element_t = 30,
+  EMPTY_guththila_element_t = 40,
   CHARACTER = 50,
   ENTITY_REFERANCE = 60,
   COMMENT = 70
@@ -70,10 +70,10 @@
   guththila_token_t *prefix;
   guththila_token_t *name;
   guththila_token_t *value;
-  STACK *stack;
-  STACK *attrib;
-  STACK *namesp;
-  STACK *dep;
+  guththila_stack_t *stack;
+  guththila_stack_t *attrib;
+  guththila_stack_t *namesp;
+  guththila_stack_t *dep;
   int _next;
   int offset;
   int last;

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=307028&r1=307027&r2=307028&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 23:11:11 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_ELEMENT;
+        return GUTHTHILA_STREAM_WRITER_ERROR_NOT_IN_START_guththila_element_t;
     if (stream_writer->empty_element)
     {
         if (fputs("/", stream_writer->writer) == EOF)
@@ -256,7 +256,7 @@
             // pop element stack
         char*** element_data = (char***) apr_array_pop(stream_writer->element_stack);
         if (!element_data )
-            return GUTHTHILA_STREAM_WRITER_ERROR_ELEMENT_STACK_EMPTY;
+            return GUTHTHILA_STREAM_WRITER_ERROR_guththila_element_t_guththila_stack_t_EMPTY;
 
             //end pop element stack
 
@@ -275,7 +275,7 @@
             free( (*element_data)[1]);
         }
         else
-            return GUTHTHILA_STREAM_WRITER_ERROR_ELEMENT_STACK_EMPTY;
+            return GUTHTHILA_STREAM_WRITER_ERROR_guththila_element_t_guththila_stack_t_EMPTY;
         
         fputs(">", stream_writer->writer);
        



Mime
View raw message