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 ro...@apache.org on 2004/04/09 07:35:56 UTC

cvs commit: ws-axis/c/src/xml/txpp/lib xpp.c xmltok_impl.c xmltok.h xmltok.c

roshan      2004/04/08 22:35:56

  Modified:    c/src/xml/txpp/lib xpp.c xmltok_impl.c xmltok.h xmltok.c
  Log:
  Applied Coding Conventions
  
  Revision  Changes    Path
  1.4       +10 -6     ws-axis/c/src/xml/txpp/lib/xpp.c
  
  Index: xpp.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/lib/xpp.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- xpp.c	8 Apr 2004 10:42:02 -0000	1.3
  +++ xpp.c	9 Apr 2004 05:35:56 -0000	1.4
  @@ -343,7 +343,8 @@
       /* printf("protocolEncodingName:%s\n", protocolEncodingName); */
           s = protocolEncodingName;
   #endif
  -        if ((ns ? XmlInitEncodingNS : XmlInitEncoding)(&initEncoding, &encoding, s))
  +        if ((ns ? XmlInitEncodingNS : XmlInitEncoding)(&initEncoding,
  +            &encoding, s))
           return XML_ERROR_NONE;
           /* return handleUnknownEncoding(parser, protocolEncodingName); */
   }
  @@ -369,14 +370,16 @@
   static int add_utf8_ptr(char *ptr, data_t *data)
   {
           if (data->num_ptrs_utf8 == data->ptrs_sz
  -                || !data->utf8ptrs) {
  +                || !data->utf8ptrs) 
  +        {
                   int sz = data->ptrs_sz << 1;
                   char **ptrs = (char **)malloc(sz << 2);
                   if (!ptrs)
                           return XML_TEST_ERROR;
  -                if (data->utf8ptrs) {
  -                        memmove(ptrs, data->utf8ptrs, data->num_ptrs_utf8 << 2);
  -                        free(data->utf8ptrs);
  +                if (data->utf8ptrs) 
  +                {
  +                       memmove(ptrs, data->utf8ptrs, data->num_ptrs_utf8 << 2);
  +                       free(data->utf8ptrs);
                   }
                   data->utf8ptrs = ptrs;
                   data->ptrs_sz = sz;
  @@ -474,7 +477,8 @@
           temp = ct->data.ptrs[data_counter + 1][1];
           ct->data.utf8ptrs[data_counter+1][1] = '\0';
           /* printf("ct->data.ptrs[data_counter]:%s\n", 
  -           ct->data.ptrs[data_counter]); */
  +         * ct->data.ptrs[data_counter]); 
  +         */
           sscanf(ct->data.utf8ptrs[data_counter], "%d", &intTemp);
           ct->data.utf8ptrs[data_counter+1][1] = temp;
                           
  
  
  
  1.3       +26 -13    ws-axis/c/src/xml/txpp/lib/xmltok_impl.c
  
  Index: xmltok_impl.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/lib/xmltok_impl.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xmltok_impl.c	8 Apr 2004 10:42:02 -0000	1.2
  +++ xmltok_impl.c	9 Apr 2004 05:35:56 -0000	1.3
  @@ -23,7 +23,8 @@
       case BT_LEAD ## n: \
         if (end - ptr < n) \
           return XML_TOK_PARTIAL_CHAR; \
  -      if (IS_INVALID_CHAR(enc, ptr, n)) { \
  +      if (IS_INVALID_CHAR(enc, ptr, n))\
  +      { \
           *(nextTokPtr) = (ptr); \
           return XML_TOK_INVALID; \
         } \
  @@ -44,7 +45,8 @@
      case BT_LEAD ## n: \
        if (end - ptr < n) \
          return XML_TOK_PARTIAL_CHAR; \
  -     if (!IS_NAME_CHAR(enc, ptr, n)) { \
  +     if (!IS_NAME_CHAR(enc, ptr, n))\
  +     { \
          *nextTokPtr = ptr; \
          return XML_TOK_INVALID; \
        } \
  @@ -53,7 +55,8 @@
   
   #define CHECK_NAME_CASES(enc, ptr, end, nextTokPtr) \
     case BT_NONASCII: \
  -    if (!IS_NAME_CHAR_MINBPC(enc, ptr)) { \
  +    if (!IS_NAME_CHAR_MINBPC(enc, ptr))\
  +    { \
         *nextTokPtr = ptr; \
         return XML_TOK_INVALID; \
       } \
  @@ -72,7 +75,8 @@
      case BT_LEAD ## n: \
        if (end - ptr < n) \
          return XML_TOK_PARTIAL_CHAR; \
  -     if (!IS_NMSTRT_CHAR(enc, ptr, n)) { \
  +     if (!IS_NMSTRT_CHAR(enc, ptr, n))\
  +     { \
          *nextTokPtr = ptr; \
          return XML_TOK_INVALID; \
        } \
  @@ -81,7 +85,8 @@
   
   #define CHECK_NMSTRT_CASES(enc, ptr, end, nextTokPtr) \
     case BT_NONASCII: \
  -    if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr)) { \
  +    if (!IS_NMSTRT_CHAR_MINBPC(enc, ptr))\
  +    { \
         *nextTokPtr = ptr; \
         return XML_TOK_INVALID; \
       } \
  @@ -257,7 +262,8 @@
       *nextTokPtr = ptr;
       return XML_TOK_INVALID;
     }
  -  while (ptr != end) {
  +  while (ptr != end) 
  +  {
       switch (BYTE_TYPE(enc, ptr)) 
       {
       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
  @@ -391,7 +397,8 @@
       {
   #define LEAD_CASE(n) \
       case BT_LEAD ## n: \
  -      if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \
  +      if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n))\
  +      { \
           *nextTokPtr = ptr; \
           return XML_TOK_DATA_CHARS; \
         } \
  @@ -433,7 +440,8 @@
     }
     while (ptr != end) 
     {
  -    switch (BYTE_TYPE(enc, ptr)) {
  +    switch (BYTE_TYPE(enc, ptr)) 
  +    {
       CHECK_NAME_CASES(enc, ptr, end, nextTokPtr)
       case BT_S: case BT_CR: case BT_LF:
         for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) 
  @@ -489,7 +497,8 @@
       }
       for (ptr += MINBPC(enc); ptr != end; ptr += MINBPC(enc)) 
       {
  -      switch (BYTE_TYPE(enc, ptr)) {
  +      switch (BYTE_TYPE(enc, ptr)) 
  +      {
         case BT_DIGIT:
         case BT_HEX:
           break;
  @@ -919,7 +928,8 @@
       {
   #define LEAD_CASE(n) \
       case BT_LEAD ## n: \
  -      if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n)) { \
  +      if (end - ptr < n || IS_INVALID_CHAR(enc, ptr, n))\
  +      { \
           *nextTokPtr = ptr; \
           return XML_TOK_DATA_CHARS; \
         } \
  @@ -1797,7 +1807,8 @@
     end -= MINBPC(enc);
     for (; ptr != end; ptr += MINBPC(enc)) 
     {
  -    switch (BYTE_TYPE(enc, ptr)) {
  +    switch (BYTE_TYPE(enc, ptr)) 
  +    {
       case BT_DIGIT:
       case BT_HEX:
       case BT_MINUS:
  @@ -1867,8 +1878,10 @@
       switch (BYTE_TYPE(enc, ptr)) 
       {
   #define START_NAME \
  -      if (state == other) { \
  -        if (nAtts < attsMax) { \
  +      if (state == other)\
  +      { \
  +        if (nAtts < attsMax)\
  +        { \
             atts[nAtts].name = ptr; \
             atts[nAtts].normalized = 1; \
           } \
  
  
  
  1.3       +8 -4      ws-axis/c/src/xml/txpp/lib/xmltok.h
  
  Index: xmltok.h
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/lib/xmltok.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xmltok.h	8 Apr 2004 10:42:02 -0000	1.2
  +++ xmltok.h	9 Apr 2004 05:35:56 -0000	1.3
  @@ -124,13 +124,15 @@
   /* The size of the buffer passed to XmlUtf16Encode must be at least this. */
   #define XML_UTF16_ENCODE_MAX 2
   
  -typedef struct position {
  +typedef struct position 
  +{
     /* first line and first column are 0 not 1 */
     unsigned long lineNumber;
     unsigned long columnNumber;
   } POSITION;
   
  -typedef struct {
  +typedef struct 
  +{
     const char *name;
     const char *valuePtr;
     const char *valueEnd;
  @@ -151,7 +153,8 @@
                                  const char **);
   
   
  -struct encoding {
  +struct encoding 
  +{
     SCANNER scanners[XML_N_STATES];
     SCANNER literalScanners[XML_N_LITERAL_TYPES];
     int (PTRCALL *sameName)(const ENCODING *,
  @@ -281,7 +284,8 @@
   #define XmlUtf16Convert(enc, fromP, fromLim, toP, toLim) \
     (((enc)->utf16Convert)(enc, fromP, fromLim, toP, toLim))
   
  -typedef struct {
  +typedef struct 
  +{
     ENCODING initEnc;
     const ENCODING **encPtr;
   } INIT_ENCODING;
  
  
  
  1.3       +72 -36    ws-axis/c/src/xml/txpp/lib/xmltok.c
  
  Index: xmltok.c
  ===================================================================
  RCS file: /home/cvs/ws-axis/c/src/xml/txpp/lib/xmltok.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- xmltok.c	8 Apr 2004 10:42:02 -0000	1.2
  +++ xmltok.c	9 Apr 2004 05:35:56 -0000	1.3
  @@ -181,7 +181,8 @@
     return UTF8_INVALID4((const unsigned char *)p);
   }
   
  -struct normal_encoding {
  +struct normal_encoding 
  +{
     ENCODING enc;
     unsigned char type[256];
   #ifdef XML_MIN_SIZE
  @@ -330,7 +331,7 @@
               const char **fromP, const char *fromLim,
               char **toP, const char *toLim)
   {
  -  //printf("came\n");
  +  /* printf("came\n"); */
     char *to;
     const char *from;
     if (fromLim - *fromP > toLim - *toP) {
  @@ -391,7 +392,8 @@
   }
   
   #ifdef XML_NS
  -static const struct normal_encoding utf8_encoding_ns = {
  +static const struct normal_encoding utf8_encoding_ns = 
  +{
     { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 },
     {
   #include "asciitab.h"
  @@ -401,7 +403,8 @@
   };
   #endif
   
  -static const struct normal_encoding utf8_encoding = {
  +static const struct normal_encoding utf8_encoding = 
  +{
     { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -414,7 +417,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding internal_utf8_encoding_ns = {
  +static const struct normal_encoding internal_utf8_encoding_ns = 
  +{
     { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 },
     {
   #include "iasciitab.h"
  @@ -425,7 +429,8 @@
   
   #endif
   
  -static const struct normal_encoding internal_utf8_encoding = {
  +static const struct normal_encoding internal_utf8_encoding = 
  +{
     { VTABLE1, utf8_toUtf8, utf8_toUtf16, 1, 1, 0 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -475,7 +480,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding latin1_encoding_ns = {
  +static const struct normal_encoding latin1_encoding_ns = 
  +{
     { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 },
     {
   #include "asciitab.h"
  @@ -486,7 +492,8 @@
   
   #endif
   
  -static const struct normal_encoding latin1_encoding = {
  +static const struct normal_encoding latin1_encoding = 
  +{
     { VTABLE1, latin1_toUtf8, latin1_toUtf16, 1, 0, 0 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -508,7 +515,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding ascii_encoding_ns = {
  +static const struct normal_encoding ascii_encoding_ns = 
  +{
     { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 },
     {
   #include "asciitab.h"
  @@ -519,7 +527,8 @@
   
   #endif
   
  -static const struct normal_encoding ascii_encoding = {
  +static const struct normal_encoding ascii_encoding = 
  +{
     { VTABLE1, ascii_toUtf8, latin1_toUtf16, 1, 1, 0 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -584,7 +593,8 @@
         *(*toP)++ = ((lo & 0x3f) | 0x80); \
         break; \
       default: \
  -      if (toLim -  *toP < 3)  { \
  +      if (toLim -  *toP < 3)\
  +      { \
           *fromP = from; \
           return; \
         } \
  @@ -594,7 +604,8 @@
         *(*toP)++ = ((lo & 0x3f) | 0x80); \
         break; \
       case 0xD8: case 0xD9: case 0xDA: case 0xDB: \
  -      if (toLim -  *toP < 4) { \
  +      if (toLim -  *toP < 4)\
  +      { \
           *fromP = from; \
           return; \
         } \
  @@ -728,7 +739,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding little2_encoding_ns = {
  +static const struct normal_encoding little2_encoding_ns = 
  +{
     { VTABLE, 2, 0,
   #if BYTEORDER == 1234
       1
  @@ -745,7 +757,8 @@
   
   #endif
   
  -static const struct normal_encoding little2_encoding = {
  +static const struct normal_encoding little2_encoding = 
  +{
     { VTABLE, 2, 0,
   #if BYTEORDER == 1234
       1
  @@ -766,7 +779,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding internal_little2_encoding_ns = {
  +static const struct normal_encoding internal_little2_encoding_ns = 
  +{
     { VTABLE, 2, 0, 1 },
     {
   #include "iasciitab.h"
  @@ -777,7 +791,8 @@
   
   #endif
   
  -static const struct normal_encoding internal_little2_encoding = {
  +static const struct normal_encoding internal_little2_encoding = 
  +{
     { VTABLE, 2, 0, 1 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -868,7 +883,8 @@
   #ifdef XML_NS
   
   
  -static const struct normal_encoding big2_encoding_ns = {
  +static const struct normal_encoding big2_encoding_ns = 
  +{
     { VTABLE, 2, 0,
   #if BYTEORDER == 4321
     1
  @@ -885,7 +901,8 @@
   
   #endif
   
  -static const struct normal_encoding big2_encoding = {
  +static const struct normal_encoding big2_encoding = 
  +{
     { VTABLE, 2, 0,
   #if BYTEORDER == 4321
     1
  @@ -906,7 +923,8 @@
   
   #ifdef XML_NS
   
  -static const struct normal_encoding internal_big2_encoding_ns = {
  +static const struct normal_encoding internal_big2_encoding_ns = 
  +{
     { VTABLE, 2, 0, 1 },
     {
   #include "iasciitab.h"
  @@ -917,7 +935,8 @@
   
   #endif
   
  -static const struct normal_encoding internal_big2_encoding = {
  +static const struct normal_encoding internal_big2_encoding = 
  +{
     { VTABLE, 2, 0, 1 },
     {
   #define BT_COLON BT_NMSTRT
  @@ -935,7 +954,8 @@
   static int FASTCALL
   streqci(const char *s1, const char *s2)
   {
  -  for (;;) {
  +  for (;;) 
  +  {
       char c1 = *s1++;
       char c2 = *s2++;
       if (ASCII_a <= c1 && c1 <= ASCII_z)
  @@ -1086,24 +1106,29 @@
     return 1;
   }
   
  -static const char KW_version[] = {
  +static const char KW_version[] = 
  +{
     ASCII_v, ASCII_e, ASCII_r, ASCII_s, ASCII_i, ASCII_o, ASCII_n, '\0'
   };
   
  -static const char KW_encoding[] = {
  +static const char KW_encoding[] = 
  +{
     ASCII_e, ASCII_n, ASCII_c, ASCII_o, ASCII_d, ASCII_i, ASCII_n, ASCII_g, '\0'
   };
   
  -static const char KW_standalone[] = {
  +static const char KW_standalone[] = 
  +{
     ASCII_s, ASCII_t, ASCII_a, ASCII_n, ASCII_d, ASCII_a, ASCII_l, ASCII_o,
     ASCII_n, ASCII_e, '\0'
   };
   
  -static const char KW_yes[] = {
  +static const char KW_yes[] = 
  +{
     ASCII_y, ASCII_e, ASCII_s,  '\0'
   };
   
  -static const char KW_no[] = {
  +static const char KW_no[] = 
  +{
     ASCII_n, ASCII_o,  '\0'
   };
   
  @@ -1388,7 +1413,8 @@
     while (*fromP != fromLim && *toP != toLim) 
     {
       unsigned short c = uenc->utf16[(unsigned char)**fromP];
  -    if (c == 0) {
  +    if (c == 0) 
  +    {
         c = (unsigned short)
             uenc->convert(uenc->userData, *fromP);
         *fromP += (AS_NORMAL_ENCODING(enc)->type[(unsigned char)**fromP]
  @@ -1501,25 +1527,31 @@
     NO_ENC
   };
   
  -static const char KW_ISO_8859_1[] = {
  +static const char KW_ISO_8859_1[] = 
  +{
     ASCII_I, ASCII_S, ASCII_O, ASCII_MINUS, ASCII_8, ASCII_8, ASCII_5, ASCII_9,
     ASCII_MINUS, ASCII_1, '\0'
   };
  -static const char KW_US_ASCII[] = {
  +static const char KW_US_ASCII[] = 
  +{
     ASCII_U, ASCII_S, ASCII_MINUS, ASCII_A, ASCII_S, ASCII_C, ASCII_I, ASCII_I,
     '\0'
   };
  -static const char KW_UTF_8[] =  {
  +static const char KW_UTF_8[] =  
  +{
     ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_8, '\0'
   };
  -static const char KW_UTF_16[] = {
  +static const char KW_UTF_16[] = 
  +{
     ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, '\0'
   };
  -static const char KW_UTF_16BE[] = {
  +static const char KW_UTF_16BE[] = 
  +{
     ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_B, ASCII_E,
     '\0'
   };
  -static const char KW_UTF_16LE[] = {
  +static const char KW_UTF_16LE[] = 
  +{
     ASCII_U, ASCII_T, ASCII_F, ASCII_MINUS, ASCII_1, ASCII_6, ASCII_L, ASCII_E,
     '\0'
   };
  @@ -1527,7 +1559,8 @@
   static int FASTCALL
   getEncodingIndex(const char *name)
   {
  -  static const char *encodingNames[] = {
  +  static const char *encodingNames[] = 
  +  {
       KW_ISO_8859_1,
       KW_US_ASCII,
       KW_UTF_8,
  @@ -1639,7 +1672,8 @@
             && state == XML_CONTENT_STATE)
           break;
         *encPtr = encodingTable[UTF_16LE_ENC];
  -      return XmlTok(parser_state, data,*encPtr, state, num_chars, end, nextTokPtr);
  +      return XmlTok(parser_state, data,*encPtr, state, num_chars, end,
  +          nextTokPtr);
       case 0xFFFE:
         if (INIT_ENC_INDEX(enc) == ISO_8859_1_ENC
             && state == XML_CONTENT_STATE)
  @@ -1683,7 +1717,8 @@
           if (state == XML_CONTENT_STATE && INIT_ENC_INDEX(enc) == UTF_16LE_ENC)
             break;
           *encPtr = encodingTable[UTF_16BE_ENC];
  -        return XmlTok(parser_state, data, *encPtr, state, num_chars, end, nextTokPtr);
  +        return XmlTok(parser_state, data, *encPtr, state, num_chars,
  +            end, nextTokPtr);
         }
         else if (ptr[1] == '\0') 
         {
  @@ -1739,6 +1774,7 @@
   }
   
   #endif /* XML_NS */
  +
   
   
   
  
  
  

Re: cvs commit: ws-axis/c/src/xml/txpp/lib xpp.c xmltok_impl.c xmltok.h xmltok.c

Posted by Adhamh Findlay <af...@austin.rr.com>.
Is it possible to get removed from this mailing list?  I unsubcribed from
the dev list, but I am still getting these emails.   I would really like to
make the stop.  I don't see a way to unsubscribe from this list at
http://ws.apache.org/axis/mail.html.

Thanks,

Adhamh


Re: cvs commit: ws-axis/c/src/xml/txpp/lib xpp.c xmltok_impl.c xmltok.h xmltok.c

Posted by Adhamh Findlay <af...@austin.rr.com>.
Is it possible to get removed from this mailing list?  I unsubcribed from
the dev list, but I am still getting these emails.   I would really like to
make the stop.  I don't see a way to unsubscribe from this list at
http://ws.apache.org/axis/mail.html.

Thanks,

Adhamh