rem: count = soap_begin_dime(soap);
add: count = soap_count_attachments(soap);
context: soap_response(struct soap *soap, int status){ register size_t count;  if (!(soap->omode & (SOAP_ENC_XML | SOAP_IO_STORE /* this tests for chunking too */))   && (status == SOAP_HTML || status == SOAP_FILE))  { soap->omode &= ~SOAP_IO;    soap->omode |= SOAP_IO_STORE;  }  soap->status = status;  count = soap_begin_dime(soap);  if (soap_begin_send(soap))    return soap->error;  if ((soap->mode & SOAP_IO) != SOAP_IO_STORE && !(soap->mode & SOAP_ENC_XML))  { register int n = soap->mode;    soap->mode &= ~(SOAP_IO | SOAP_ENC_ZLIB);    if ((n & SOAP_IO) != SOAP_IO_FLUSH)      soap->mode |= SOAP_IO_BUFFER;    if ((soap->error = soap->fresponse(soap, status, count)))      return soap->error;    if ((n & SOAP_IO) == SOAP_IO_CHUNK)    { if (soap_flush(soap))        return soap->error;    }    soap->mode = n;  }#ifndef WITH_LEANER  if (soap->mode & SOAP_ENC_DIME)    return soap_putdimehdr(soap);#endif  return SOAP_OK;}