You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by sa...@apache.org on 2005/10/07 05:42:09 UTC

svn commit: r306991 - in /webservices/axis2/trunk/c/modules/xml/guththila/src: guththila_attribute.h guththila_stack.c guththila_stack.h guththila_token.c guththila_token.h guththila_xml_pull_parser.c guththila_xml_pull_parser.h

Author: samisa
Date: Thu Oct  6 20:42:00 2005
New Revision: 306991

URL: http://svn.apache.org/viewcvs?rev=306991&view=rev
Log:
Renamed TOKEN to guththila_token_t

Modified:
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_attribute.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_token.c
    webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.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

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_attribute.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_attribute.h?rev=306991&r1=306990&r2=306991&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_attribute.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_attribute.h Thu Oct  6 20:42:00 2005
@@ -23,9 +23,9 @@
 
 typedef struct attribute
 {
-  TOKEN *prefix;
-  TOKEN *name;
-  TOKEN *value;
+  guththila_token_t *prefix;
+  guththila_token_t *name;
+  guththila_token_t *value;
 }ATTRIBUTE;
 
 #endif /* ATTRIBUTE_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=306991&r1=306990&r2=306991&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 20:42:00 2005
@@ -38,7 +38,7 @@
 
 
 int 
-Stack_push (STACK *stack, TOKEN *tok, ATTRIBUTE *attr)
+Stack_push (STACK *stack, guththila_token_t *tok, ATTRIBUTE *attr)
 {
   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=306991&r1=306990&r2=306991&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 20:42:00 2005
@@ -37,7 +37,7 @@
 
 typedef struct element
 {
-  TOKEN *token;
+  guththila_token_t *token;
   ATTRIBUTE *attribute;
   NAMESPACE *namespace;
   DEPTH *depth;
@@ -55,7 +55,7 @@
 
 /* stack implementation */
 STACK *Stack_createStack ();
-int Stack_push (STACK *st, TOKEN *tok, ATTRIBUTE *attr);
+int Stack_push (STACK *st, guththila_token_t *tok, ATTRIBUTE *attr);
 int Stack_size (STACK *st);
 void Stack_free (STACK *st);
 void Stack_free_rec (STACK *st, ELEMENT *el);

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.c
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.c?rev=306991&r1=306990&r2=306991&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.c (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.c Thu Oct  6 20:42:00 2005
@@ -21,17 +21,17 @@
 #include "guththila_token.h"
 #include "guththila_unicode.h"
 
-TOKEN *
+guththila_token_t *
 Token_createTokenBuffer (int size)
 {
-  TOKEN *tok = (TOKEN *) malloc (sizeof(TOKEN)*size);
+  guththila_token_t *tok = (guththila_token_t *) malloc (sizeof(guththila_token_t)*size);
   tok->size = size;
   return tok;
 }
 
 
 void
-Token_freeTokenBuffer (TOKEN *tok)
+Token_freeTokenBuffer (guththila_token_t *tok)
 {
   if (tok)
     free (tok);
@@ -47,7 +47,7 @@
 
 
 int
-Token_length (TOKEN *tok)
+Token_length (guththila_token_t *tok)
 {
   if (tok->end)
     return (tok->end) - (tok->start) + 1;
@@ -57,17 +57,17 @@
 }
 
 
-TOKEN *
-Token_grow (TOKEN *tok)
+guththila_token_t *
+Token_grow (guththila_token_t *tok)
 {
   tok->size <<= 1;
-  tok = (TOKEN *) realloc (tok, sizeof(TOKEN)*tok->size);
+  tok = (guththila_token_t *) realloc (tok, sizeof(guththila_token_t)*tok->size);
   return tok;
 }
 
 
-TOKEN *
-Token_append (TOKEN *tok)
+guththila_token_t *
+Token_append (guththila_token_t *tok)
 {
   if (++ (tok->last) > (tok->size))
     Token_grow (tok);
@@ -75,8 +75,8 @@
 }
 
 
-TOKEN *
-Token_last (TOKEN *tok)
+guththila_token_t *
+Token_last (guththila_token_t *tok)
 {
   if (tok->last < 0)
     Token_Exception ();
@@ -85,7 +85,7 @@
 
 
 int
-Token_count (TOKEN *tok)
+Token_count (guththila_token_t *tok)
 {
   return tok->last;
 }
@@ -153,7 +153,7 @@
 
 
 char *
-Token_toString (TOKEN *tok, int unicode)
+Token_toString (guththila_token_t *tok, int unicode)
 {
   if (tok)
     {
@@ -187,7 +187,7 @@
 
 
 void
-Token_relocate (TOKEN *tok, int offset)
+Token_relocate (guththila_token_t *tok, int offset)
 {
   tok->start -= offset;
   tok->end -= offset;
@@ -195,7 +195,7 @@
 
 
 int
-Token_compare (TOKEN *tok, const char *s, int n, int unicode_state)
+Token_compare (guththila_token_t *tok, const char *s, int n, int unicode_state)
 {
   if (unicode_state == None)
     return strncmp (tok->start, s, n);

Modified: webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.h
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.h?rev=306991&r1=306990&r2=306991&view=diff
==============================================================================
--- webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.h (original)
+++ webservices/axis2/trunk/c/modules/xml/guththila/src/guththila_token.h Thu Oct  6 20:42:00 2005
@@ -18,13 +18,13 @@
  */
 
 
-#ifndef TOKEN_H
-#define TOKEN_H
+#ifndef GUTHTHILA_guththila_token_t_H
+#define GUTHTHILA_guththila_token_t_H
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-typedef struct token
+typedef struct guththila_token_s
 {
   int type;
   char *start;
@@ -32,10 +32,10 @@
   int last;
   int size;
   int ref;
-}TOKEN;
+} guththila_token_t;
 
 
-enum _type
+enum guththila_token_type
   {
     Unknown = 1,
     Name,
@@ -46,23 +46,21 @@
     CharData
   };
 
-enum _type TYPE;
 
-
-TOKEN* Token_createTokenBuffer(int size);
-void Token_freeTokenBuffer (TOKEN *tok);
-int Token_length (TOKEN *tok);
+guththila_token_t* Token_createTokenBuffer(int size);
+void Token_freeTokenBuffer (guththila_token_t *tok);
+int Token_length (guththila_token_t *tok);
 void Token_Exception ();
-TOKEN* Token_append (TOKEN *tok);
-TOKEN* Token_grow (TOKEN *tok);
-TOKEN* Token_last (TOKEN *tok);
-int Token_count (TOKEN *tok);
-char* Token_toString (TOKEN *tok, int unicode);
-void Token_relocate (TOKEN *tok, int offset);
-int Token_compare (TOKEN *tok, const char *st, int n, int unicode_state);
+guththila_token_t* Token_append (guththila_token_t *tok);
+guththila_token_t* Token_grow (guththila_token_t *tok);
+guththila_token_t* Token_last (guththila_token_t *tok);
+int Token_count (guththila_token_t *tok);
+char* Token_toString (guththila_token_t *tok, int unicode);
+void Token_relocate (guththila_token_t *tok, int offset);
+int Token_compare (guththila_token_t *tok, const char *st, int n, int unicode_state);
 char *Token_convert_utf16_to_utf8 (char *buffer, int length);
 int Token_length_utf16 (unsigned int utf16_ch);
 char *Token_build_utf8 (unsigned int utf16_ch, int length);
 char *Token_char_ref (char *buffer);
 
-#endif /* TOKEN_H */
+#endif /* GUTHTHILA_guththila_token_t_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=306991&r1=306990&r2=306991&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 20:42:00 2005
@@ -29,9 +29,9 @@
   parser->attrib = Stack_createStack ();
   parser->namesp = Stack_createStack ();
   parser->dep = Stack_createStack ();
-  parser->name = (TOKEN *) malloc (sizeof (TOKEN));
-  parser->prefix = (TOKEN *) malloc (sizeof (TOKEN));
-  parser->value = (TOKEN *) malloc (sizeof (TOKEN));
+  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));
   parser->reader = r;
   parser->_next = 0;
   parser->offset = 0;
@@ -194,7 +194,7 @@
 void
 XML_PullParser_openToken (XML_PullParser * parser)
 {
-  TOKEN *t = (TOKEN *) malloc (sizeof (TOKEN));
+  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);
@@ -699,8 +699,8 @@
       {
 	int ix;
 	ELEMENT *e;
-	TOKEN *att_name;
-	TOKEN *att_value;
+	guththila_token_t *att_name;
+	guththila_token_t *att_value;
 	ix = Stack_size (parser->stack);
 	for (; ix > 0; ix--)
 	  {
@@ -721,8 +721,8 @@
       {
 	int is = 0;
 	ELEMENT *e;
-	TOKEN *name = NULL;
-	TOKEN *value = NULL;
+	guththila_token_t *name = NULL;
+	guththila_token_t *value = NULL;
 	is = Stack_size (parser->stack);
 	for (; is > 0 && Stack_size (parser->stack); is--)
 	  {
@@ -859,8 +859,8 @@
 
 
 void
-XML_PullParser_addAttribute (XML_PullParser * parser, TOKEN * name,
-			     TOKEN * value)
+XML_PullParser_addAttribute (XML_PullParser * parser, guththila_token_t * name,
+			     guththila_token_t * value)
 {
   ATTRIBUTE *att;
   att = (ATTRIBUTE *) malloc (sizeof (ATTRIBUTE));
@@ -873,8 +873,8 @@
 
 void
 XML_PullParser_addAttribute_with_prefix (XML_PullParser * parser,
-					 TOKEN * prefix, TOKEN * name,
-					 TOKEN * value)
+					 guththila_token_t * prefix, guththila_token_t * name,
+					 guththila_token_t * value)
 {
   ATTRIBUTE *att;
   att = (ATTRIBUTE *) malloc (sizeof (ATTRIBUTE));
@@ -887,8 +887,8 @@
 
 
 void
-XML_PullParser_addNamespace (XML_PullParser * parser, TOKEN * name,
-			     TOKEN * uri)
+XML_PullParser_addNamespace (XML_PullParser * parser, guththila_token_t * name,
+			     guththila_token_t * uri)
 {
   NAMESPACE *ns;
   ns = (NAMESPACE *) malloc (sizeof (NAMESPACE));

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=306991&r1=306990&r2=306991&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 20:42:00 2005
@@ -67,9 +67,9 @@
 {
   BUFFER *buffer;
   READER *reader;
-  TOKEN *prefix;
-  TOKEN *name;
-  TOKEN *value;
+  guththila_token_t *prefix;
+  guththila_token_t *name;
+  guththila_token_t *value;
   STACK *stack;
   STACK *attrib;
   STACK *namesp;
@@ -95,11 +95,11 @@
 void XML_PullParser_closeToken (XML_PullParser * p, int t, int refer);
 char *XML_PullParser_lastChar (XML_PullParser * p);
 int XML_PullParser_processEq (XML_PullParser * p, int c);
-void XML_PullParser_addAttribute (XML_PullParser * p, TOKEN * name,
-				  TOKEN * value);
+void XML_PullParser_addAttribute (XML_PullParser * p, guththila_token_t * name,
+				  guththila_token_t * value);
 void XML_PullParser_addAttribute_with_prefix (XML_PullParser * p,
-					      TOKEN * prefix, TOKEN * name,
-					      TOKEN * value);
+					      guththila_token_t * prefix, guththila_token_t * name,
+					      guththila_token_t * value);
 int XML_PullParser_processCharData (XML_PullParser * p);
 int XML_PullParser_processSTagOrEmtyElem (XML_PullParser * p);
 int XML_PullParser_processComment (XML_PullParser * p);
@@ -112,8 +112,8 @@
 int XML_PullParser_isS (int c);
 void XML_PullParser_relocateTokens (XML_PullParser * p, int offset);
 void XML_PullParser_shift (XML_PullParser * p);
-void XML_PullParser_addNamespace (XML_PullParser * p, TOKEN * name,
-				  TOKEN * uri);
+void XML_PullParser_addNamespace (XML_PullParser * p, guththila_token_t * name,
+				  guththila_token_t * uri);
 void XML_PullParser_openElement (XML_PullParser * p);
 void XML_PullParser_closeElement (XML_PullParser * p);
 int XML_PullParser_from_utf16 (XML_PullParser * p, int eof);