rem: { c = soap_get1(soap);
add: { c = soap_getchar(soap);
context: soap_string_in(struct soap *soap, int flag){ register char *s;  char *t = NULL;  register size_t i;  register int n = 0;  register int m = 0;  register wchar c;#ifdef HAVE_WCTOMB  char buf[MB_LEN_MAX > 8 ? MB_LEN_MAX : 8];#else  char buf[8];#endif#ifdef WITH_CDATA  if (!flag)  { register int state = 0;#ifdef WITH_FAST    soap->labidx = 0;			/* use look-aside buffer */#else    if (soap_new_block(soap))      return NULL;#endif    for (;;)    {#ifdef WITH_FAST      register size_t k;      if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */        return NULL;      s = soap->labbuf + soap->labidx;	/* space to populate */      k = soap->lablen - soap->labidx;	/* number of bytes available */      soap->labidx = soap->lablen;	/* claim this space */#else      register size_t k = SOAP_BLKLEN;      if (!(s = (char*)soap_push_block(soap, k)))        return NULL;#endif      for (i = 0; i < k; i++)      { if (m > 0)        { *s++ = *t++;	/* copy multibyte characters */	  m--;          continue;        }        c = soap_getchar(soap);	if ((int)c == EOF)          goto end;        if (c >= 0x80 && !(soap->mode & SOAP_C_LATIN))        { soap_unget(soap, c);	  c = soap_getutf8(soap);	  if (soap->mode & SOAP_C_UTFSTRING)          { if ((c & 0x80000000) && c >= -0x7FFFFF80 && c < AP)            { c &= 0x7FFFFFFF;              t = buf;              if (c < 0x0800)                *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));              else              { if (c < 0x010000)                  *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));                else                { if (c < 0x200000)                    *t++ = (char)(0xF0 | ((c >> 18) & 0x07));                  else                  { if (c < 0x04000000)                      *t++ = (char)(0xF8 | ((c >> 24) & 0x03));                    else                    { *t++ = (char)(0xFC | ((c >> 30) & 0x01));                      *t++ = (char)(0x80 | ((c >> 24) & 0x3F));                    }                    *t++ = (char)(0x80 | ((c >> 18) & 0x3F));                  }                  *t++ = (char)(0x80 | ((c >> 12) & 0x3F));                }                *t++ = (char)(0x80 | ((c >> 6) & 0x3F));              }              *t++ = (char)(0x80 | (c & 0x3F));	      m = (int)(t - buf) - 1;              t = buf;              *s++ = *t++;              continue;	    }          }        }	switch (state)        { case 1:            if (c == ']')	      state = 4;	    *s++ = c;	    continue;	  case 2:	    if (c == '-')              state = 6;	    *s++ = c;	    continue;	  case 3:	    if (c == '?')	      state = 8;	    *s++ = c;	    continue;          /* CDATA */	  case 4:	    if (c == ']')              state = 5;	    else	      state = 1;	    *s++ = c;	    continue;	  case 5:	    if (c == '>')	      state = 0;	    else	      state = 1;	    *s++ = c;	    continue;          /* comment */          case 6:            if (c == '-')	      state = 7;	    else	      state = 2;	    *s++ = c;	    continue;          case 7:            if (c == '>')	      state = 0;	    else	      state = 2;	    *s++ = c;	    continue;          /* PI */	  case 8:            if (c == '>')	      state = 0;	    else	      state = 3;	    *s++ = c;	    continue;        }        switch (c)        {        case '/':          if (n > 0)          { c = soap_get1(soap);            if (c == '>')              n--;            soap_unget(soap, c);          }          *s++ = '/';          break;        case '<':	  c = soap_get1(soap);	  if (c == '/')	  { if (n == 0)	    { c = TT;	      goto end;	    }	    n--;	  }	  else if (c == '!')	  { c = soap_get1(soap);	    if (c == '[')            { do c = soap_get1(soap);              while ((int)c != EOF && c != '[');              if ((int)c == EOF)                 goto end;	      t = (char*)"![CDATA[";	      state = 1;	    }            else if (c == '-')	    { if ((c = soap_get1(soap)) == '-')	        state = 2;	      t = (char*)"!-";	      soap_unget(soap, c);	    }	    else	    { t = (char*)"!";	      soap_unget(soap, c);	    }	    *s++ = '<';	    break;	  }	  else if (c == '?')	    state = 3;	  else	    n++;          soap_unget(soap, c);          *s++ = '<';          break;        case '>':          *s++ = '>';          break;        case '"':          *s++ = '"';          break;        default:#ifdef HAVE_WCTOMB          if (soap->mode & SOAP_C_MBSTRING)          { m = wctomb(buf, c & 0x7FFFFFFF);            if (m >= 1)            { t = buf;              *s++ = *t++;              m--;            }            else              *s++ = SOAP_UNKNOWN_CHAR;          }          else#endif            *s++ = (char)(c & 0xFF);        }      }    }  }#endif#ifdef WITH_FAST  soap->labidx = 0;			/* use look-aside buffer */#else  if (soap_new_block(soap))    return NULL;#endif  for (;;)  {#ifdef WITH_FAST    register size_t k;    if (soap_append_lab(soap, NULL, 0))	/* allocate more space in look-aside buffer if necessary */      return NULL;    s = soap->labbuf + soap->labidx;	/* space to populate */    k = soap->lablen - soap->labidx;	/* number of bytes available */    soap->labidx = soap->lablen;	/* claim this space */#else    register size_t k = SOAP_BLKLEN;    if (!(s = (char*)soap_push_block(soap, k)))      return NULL;#endif    for (i = 0; i < k; i++)    { if (m > 0)      { *s++ = *t++;	/* copy multibyte characters */        m--;        continue;      }      if (soap->mode & SOAP_C_UTFSTRING)      { if (((c = soap_get(soap)) & 0x80000000) && c >= -0x7FFFFF80 && c < AP)        { c &= 0x7FFFFFFF;          t = buf;          if (c < 0x0800)            *t++ = (char)(0xC0 | ((c >> 6) & 0x1F));          else          { if (c < 0x010000)              *t++ = (char)(0xE0 | ((c >> 12) & 0x0F));            else            { if (c < 0x200000)                *t++ = (char)(0xF0 | ((c >> 18) & 0x07));              else              { if (c < 0x04000000)                  *t++ = (char)(0xF8 | ((c >> 24) & 0x03));                else                { *t++ = (char)(0xFC | ((c >> 30) & 0x01));                  *t++ = (char)(0x80 | ((c >> 24) & 0x3F));                }                *t++ = (char)(0x80 | ((c >> 18) & 0x3F));              }              *t++ = (char)(0x80 | ((c >> 12) & 0x3F));            }            *t++ = (char)(0x80 | ((c >> 6) & 0x3F));          }          *t++ = (char)(0x80 | (c & 0x3F));	  m = (int)(t - buf) - 1;          t = buf;          *s++ = *t++;          continue;        }      }      else if (soap->mode & SOAP_C_LATIN)        c = soap_get(soap);      else        c = soap_getutf8(soap);      switch (c)      {      case TT:        if (n == 0)          goto end;        n--;        *s++ = '<';        soap_unget(soap, '/');        break;      case LT:        n++;        *s++ = '<';        break;      case GT:        *s++ = '>';        break;      case QT:        *s++ = '"';        break;      case AP:        *s++ = '\'';        break;      case '/':        if (n > 0)        { c = soap_get(soap);          if (c == GT)            n--;          soap_unget(soap, c);        }        *s++ = '/';        break;      case '<':        if (flag)          *s++ = '<';        else        { *s++ = '&';          t = (char*)"lt;";        }        break;      case '>':        if (flag)          *s++ = '>';        else        { *s++ = '&';          t = (char*)"gt;";        }        break;      case '"':        if (flag)          *s++ = '"';        else        { *s++ = '&';          t = (char*)"quot;";        }        break;      default:        if ((int)c == EOF)          goto end;#ifdef HAVE_WCTOMB        if (soap->mode & SOAP_C_MBSTRING)        { m = wctomb(buf, c & 0x7FFFFFFF);          if (m >= 1)          { t = buf;            *s++ = *t++;            m--;          }          else            *s++ = SOAP_UNKNOWN_CHAR;        }        else#endif          *s++ = (char)(c & 0xFF);      }    }  }end:  soap_unget(soap, c);  *s = '\0';#ifdef WITH_FAST  t = soap_strdup(soap, soap->labbuf);#else  soap_size_block(soap, i+1);  t = soap_save_block(soap, NULL);#endif  if (flag == 2)    if (soap_s2QName(soap, t, &t))      return NULL;  return t;}