From e8e6d1810dd03f68b5d654fd363653805bd195d5 Mon Sep 17 00:00:00 2001
From: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
Date: Sat, 14 Nov 2026 14:52:07 -0300
Subject: GroupWise SOAP runtime: Use nullptr for pointer defaults
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Convert the typed null pointer constants in the vendored gSOAP 2.7.3 runtime. Keep scalar zero values, bindings, and GroupWise adapters unchanged.

Signed-off-by: Sebastião Guerra <sebastiao.luiz.guerra@gmail.com>
---
 tderesources/groupwise/soap/stdsoap2.cpp | 742 +++++++++++++++----------------
 1 file changed, 371 insertions(+), 371 deletions(-)

diff --git a/tderesources/groupwise/soap/stdsoap2.cpp b/tderesources/groupwise/soap/stdsoap2.cpp
index 959878588..2e68b668c 100644
--- a/tderesources/groupwise/soap/stdsoap2.cpp
+++ b/tderesources/groupwise/soap/stdsoap2.cpp
@@ -306,7 +306,7 @@ static const struct soap_code_map html_entity_codes[] = /* entities for XHTML pa
   { 253, "yacute" },
   { 254, "thorn" },
   { 255, "yuml" },
-  {   0, NULL }
+  {   0, nullptr }
 };
 #endif
 
@@ -329,7 +329,7 @@ static const struct soap_code_map h_error_codes[] =
 #ifdef NO_ADDRESS
   { NO_ADDRESS, "No Address" },
 #endif
-  { 0, NULL }
+  { 0, nullptr }
 };
 #endif
 #endif
@@ -374,7 +374,7 @@ static const struct soap_code_map h_http_error_codes[] =
   { 503, "Service Unavailable" },
   { 504, "Gateway Time-out" },
   { 505, "HTTP Version not supported" },
-  {   0, NULL }
+  {   0, nullptr }
 };
 #endif
 #endif
@@ -403,7 +403,7 @@ static const struct soap_code_map mime_codes[] =
   { SOAP_MIME_BASE64,		"base64" },
   { SOAP_MIME_IETF_TOKEN,	"ietf-token" },
   { SOAP_MIME_X_TOKEN,		"x-token" },
-  { 0,				NULL }
+  { 0,				nullptr }
 };
 #endif
 
@@ -443,7 +443,7 @@ fsend(struct soap *soap, const char *s, size_t n)
         FD_ZERO(&fd);
         FD_SET((SOAP_SOCKET)soap->socket, &fd);
         for (;;)
-        { int r = select((SOAP_SOCKET)(soap->socket + 1), NULL, &fd, &fd, &timeout);
+        { int r = select((SOAP_SOCKET)(soap->socket + 1), nullptr, &fd, &fd, &timeout);
           if (r > 0)
             break;
           if (!r)
@@ -738,7 +738,7 @@ frecv(struct soap *soap, char *s, size_t n)
         FD_ZERO(&fd);
         FD_SET((SOAP_SOCKET)soap->socket, &fd);
         for (;;)
-        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+        { r = select((SOAP_SOCKET)(soap->socket + 1), &fd, nullptr, &fd, &timeout);
           if (r > 0)
             break;
           if (!r)
@@ -798,7 +798,7 @@ frecv(struct soap *soap, char *s, size_t n)
         else
           r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
 #else
-        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, NULL, &fd, &timeout);
+        r = select((SOAP_SOCKET)(soap->socket + 1), &fd, nullptr, &fd, &timeout);
 #endif
         if (r < 0 && soap_socket_errno != SOAP_EINTR)
         { soap->errnum = soap_socket_errno;
@@ -1116,7 +1116,7 @@ soap_code(const struct soap_code_map *map, const char *str)
       map++;
     }
   }
-  return NULL;
+  return nullptr;
 }
 #endif
 
@@ -1164,7 +1164,7 @@ soap_char(struct soap *soap)
   *s = '\0';
   if (*tmp == '#')
   { if (tmp[1] == 'x' || tmp[1] == 'X')
-      return soap_strtol(tmp + 2, NULL, 16);
+      return soap_strtol(tmp + 2, nullptr, 16);
     return atol(tmp + 1);
   }
   if (!strcmp(tmp, "lt"))
@@ -1469,13 +1469,13 @@ soap_gethex(struct soap *soap, int *n)
   }
 #else
   if (soap_new_block(soap))
-    return NULL;
+    return nullptr;
   for (;;)
   { int i;
     char *s = (char*)soap_push_block(soap, SOAP_BLKLEN);
     if (!s)
     { soap_end_block(soap);
-      return NULL;
+      return nullptr;
     }
     for (i = 0; i < SOAP_BLKLEN; i++)
     { char d1, d2;
@@ -1488,7 +1488,7 @@ soap_gethex(struct soap *soap, int *n)
         else
         { soap_end_block(soap);
 	  soap->error = SOAP_TYPE;
-          return NULL;
+          return nullptr;
         }
       }
       else
@@ -1496,7 +1496,7 @@ soap_gethex(struct soap *soap, int *n)
         soap_unget(soap, c);
         if (n)
           *n = soap_size_block(soap, i);
-        p = (unsigned char*)soap_save_block(soap, NULL, 0);
+        p = (unsigned char*)soap_save_block(soap, nullptr, 0);
         return p;
       }
       *s++ = ((d1 >= 'A' ? (d1 & 0x7) + 9 : d1 - '0') << 4) + (d2 >= 'A' ? (d2 & 0x7) + 9 : d2 - '0');
@@ -1611,13 +1611,13 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag)
   }
 #else
   if (soap_new_block(soap))
-    return NULL;
+    return nullptr;
   for (;;)
   { int i;
     char *s = (char*)soap_push_block(soap, 3 * SOAP_BLKLEN); /* must be multiple of 3 */
     if (!s)
     { soap_end_block(soap);
-      return NULL;
+      return nullptr;
     }
     for (i = 0; i < SOAP_BLKLEN; i++)
     { unsigned long m = 0;
@@ -1639,7 +1639,7 @@ soap_getbase64(struct soap *soap, int *n, int malloc_flag)
           }
           if (n)
 	    *n = (int)soap_size_block(soap, i);
-          p = (unsigned char*)soap_save_block(soap, NULL, 0);
+          p = (unsigned char*)soap_save_block(soap, nullptr, 0);
           if (c >= 0)
           { while ((int)((c = soap_get(soap)) != EOF) && c != SOAP_LT && c != SOAP_TT)
               ;
@@ -1675,7 +1675,7 @@ soap_xop_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, c
     { if (soap_dime_forward(soap, ptr, size, id, type, options))
         return soap->error;
     }
-    if (soap->body && soap_element_end_in(soap, NULL))
+    if (soap->body && soap_element_end_in(soap, nullptr))
       return soap->error;
   }
   soap->body = body;
@@ -1692,11 +1692,11 @@ int
 SOAP_FMAC2
 soap_dime_forward(struct soap *soap, unsigned char **ptr, int *size, char **id, char **type, char **options)
 { struct soap_xlist *xp = (struct soap_xlist*)SOAP_MALLOC(soap, sizeof(struct soap_xlist));
-  *ptr = NULL;
+  *ptr = nullptr;
   *size = 0;
   *id = soap_strdup(soap, soap->href);
-  *type = NULL;
-  *options = NULL;
+  *type = nullptr;
+  *options = nullptr;
   if (!xp)
     return soap->error = SOAP_EOM;
   xp->next = soap->xlist;
@@ -1717,7 +1717,7 @@ SOAP_FMAC1
 char *
 SOAP_FMAC2
 soap_strdup(struct soap *soap, const char *s)
-{ char *t = NULL;
+{ char *t = nullptr;
   if (s && (t = (char*)soap_malloc(soap, strlen(s) + 1)))
     strcpy(t, s);
   return t;
@@ -1735,7 +1735,7 @@ soap_new_block(struct soap *soap)
   if (!(p = (struct soap_blist*)SOAP_MALLOC(soap, sizeof(struct soap_blist))))
     return SOAP_EOM;
   p->next = soap->blist;
-  p->ptr = NULL;
+  p->ptr = nullptr;
   p->size = 0;
   soap->blist = p;
   return SOAP_OK;
@@ -1752,7 +1752,7 @@ soap_push_block(struct soap *soap, size_t n)
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push block of %u bytes (%u bytes total)\n", (unsigned int)n, (unsigned int)soap->blist->size + (unsigned int)n));
   if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(char*) + sizeof(size_t))))
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   *(char**)p = soap->blist->ptr;
   *(size_t*)(p + sizeof(char*)) = n;
@@ -1875,7 +1875,7 @@ soap_resolve(struct soap *soap)
     { if (ip->ptr)
       { void *p, **q, *r;
         q = (void**)ip->link;
-        ip->link = NULL;
+        ip->link = nullptr;
         r = ip->ptr;
         DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing link chain to resolve id='%s'\n", ip->id));
         while (q)
@@ -1901,7 +1901,7 @@ soap_resolve(struct soap *soap)
         { if (ip->copy)
           { void *p, **q = (void**)ip->copy;
             DBGLOG(TEST, if (q) SOAP_MESSAGE(fdebug, "Traversing copy chain to resolve id='%s'\n", ip->id));
-            ip->copy = NULL;
+            ip->copy = nullptr;
             do
             { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "... copy %p -> %p (%u bytes)\n", ip->ptr, q, (unsigned int)ip->size));
 	      p = *q;
@@ -1973,9 +1973,9 @@ soap_first_block(struct soap *soap)
 { char *p, *q, *r;
   p = soap->blist->ptr;
   if (!p)
-    return NULL;
+    return nullptr;
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "First block\n"));
-  r = NULL;
+  r = nullptr;
   do
   { q = *(char**)p;
     *(char**)p = r;
@@ -2002,7 +2002,7 @@ soap_next_block(struct soap *soap)
     if (soap->blist->ptr)
       return soap->blist->ptr + sizeof(char*) + sizeof(size_t);
   }
-  return NULL;
+  return nullptr;
 }
 #endif
 
@@ -2086,7 +2086,7 @@ SOAP_FMAC1
 char *
 SOAP_FMAC2
 soap_putsizes(struct soap *soap, const char *type, const int *size, int dim)
-{ return soap_putsizesoffsets(soap, type, size, NULL, dim);
+{ return soap_putsizesoffsets(soap, type, size, nullptr, dim);
 }
 #endif
 
@@ -2098,7 +2098,7 @@ SOAP_FMAC2
 soap_putsizesoffsets(struct soap *soap, const char *type, const int *size, const int *offset, int dim)
 { int i;
   if (!type)
-    return NULL;
+    return nullptr;
   if (soap->version == 2)
   { sprintf(soap->type, "%s[%d", type, size[0]);
     for (i = 1; i < dim; i++)
@@ -2283,7 +2283,7 @@ soap_push_namespace(struct soap *soap, const char *id, const char *ns)
   strcpy(np->id, id);
   np->level = soap->level;
   np->index = -1;
-  np->ns = NULL;
+  np->ns = nullptr;
   np->next = soap->nlist;
   soap->nlist = np;
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Push namespace binding (level=%u) '%s' '%s'\n", soap->level, id, ns));
@@ -2294,7 +2294,7 @@ soap_push_namespace(struct soap *soap, const char *id, const char *ns)
     { if (p->ns && !strcmp(ns, p->ns))
       { if (p->out)
         { SOAP_FREE(soap, p->out);
-          p->out = NULL;
+          p->out = nullptr;
         }
         break;
       }
@@ -2880,13 +2880,13 @@ soap_done(struct soap *soap)
   soap->fpoll = NULL;
 #endif
 #ifndef WITH_LEANER
-  soap->fprepareinit = NULL;
-  soap->fpreparesend = NULL;
-  soap->fpreparerecv = NULL;
+  soap->fprepareinit = nullptr;
+  soap->fpreparesend = nullptr;
+  soap->fpreparerecv = nullptr;
 #endif
-  soap->fseterror = NULL;
-  soap->fignore = NULL;
-  soap->fserveloop = NULL;
+  soap->fseterror = nullptr;
+  soap->fignore = nullptr;
+  soap->fserveloop = nullptr;
 #ifdef WITH_OPENSSL
   if (soap->session)
   { SSL_SESSION_free(soap->session);
@@ -2941,7 +2941,7 @@ soap_cleanup(struct soap *soap)
 #ifndef PALM_1
 static const char*
 tcp_error(struct soap *soap)
-{ const char *msg = NULL;
+{ const char *msg = nullptr;
   switch (soap->errmode)
   { case 0:
       msg = soap_strerror(soap);
@@ -3010,7 +3010,7 @@ tcp_gethost(struct soap *soap, const char *addr, struct in_addr *inaddr)
   }
 #if defined(__GLIBC__)
   if (gethostbyname_r(addr, &hostent, soap->buf, SOAP_BUFLEN, &host, &soap->errnum) < 0)
-    host = NULL;
+    host = nullptr;
 #elif defined(_AIXVERSION_431)
   memset((void*)&ht_data, 0, sizeof(ht_data));
   if (gethostbyname_r(addr, &hostent, &ht_data) < 0)
@@ -3239,7 +3239,7 @@ again:
         FD_ZERO(&fds);
         FD_SET((SOAP_SOCKET)fd, &fds);
         for (;;)
-        { int r = select((SOAP_SOCKET)(fd + 1), NULL, &fds, NULL, &timeout);
+        { int r = select((SOAP_SOCKET)(fd + 1), nullptr, &fds, nullptr, &timeout);
           if (r > 0)
 	    break;
           if (!r)
@@ -3630,7 +3630,7 @@ soap_poll(struct soap *soap)
   }
   else if (soap_valid_socket(soap->master))
   { FD_SET((SOAP_SOCKET)soap->master, &sfd);
-    r = select((SOAP_SOCKET)(soap->master + 1), NULL, &sfd, NULL, &timeout);
+    r = select((SOAP_SOCKET)(soap->master + 1), nullptr, &sfd, nullptr, &timeout);
   }
   else
     return SOAP_OK;
@@ -3718,7 +3718,7 @@ soap_accept(struct soap *soap)
         FD_ZERO(&fd);
         FD_SET((SOAP_SOCKET)soap->master, &fd);
         for (;;)
-        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, NULL, &timeout);
+        { int r = select((SOAP_SOCKET)(soap->master + 1), &fd, &fd, nullptr, &timeout);
           if (r > 0)
             break;
           if (!r)
@@ -3965,7 +3965,7 @@ soap_init_pht(struct soap *soap)
 { int i;
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing pointer hashtable\n"));
   for (i = 0; i < (int)SOAP_PTRHASH; i++)
-    soap->pht[i] = NULL;
+    soap->pht[i] = nullptr;
 }
 #endif
 #endif
@@ -4016,7 +4016,7 @@ soap_free_pht(struct soap *soap)
     { next = pp->next;
       SOAP_FREE(soap, pp);
     }
-    soap->pht[i] = NULL;
+    soap->pht[i] = nullptr;
   }
 }
 #endif
@@ -4056,7 +4056,7 @@ int
 SOAP_FMAC2
 soap_pointer_lookup(struct soap *soap, const void *p, int type, struct soap_plist **ppp)
 { struct soap_plist *pp;
-  *ppp = NULL;
+  *ppp = nullptr;
   if (p)
     for (pp = soap->pht[soap_hash_ptr(p)]; pp; pp = pp->next)
       if (pp->ptr == p && pp->type == type)
@@ -4107,7 +4107,7 @@ int
 SOAP_FMAC2
 soap_array_pointer_lookup(struct soap *soap, const void *p, const struct soap_array *a, int n, int type, struct soap_plist **ppp)
 { struct soap_plist *pp;
-  *ppp = NULL;
+  *ppp = nullptr;
   if (!p || !a->__ptr)
     return 0;
   for (pp = soap->pht[soap_hash_ptr(a->__ptr)]; pp; pp = pp->next)
@@ -4324,7 +4324,7 @@ soap_reference(struct soap *soap, const void *p, int t)
       pp->mark2 = 2;
     }
   }
-  else if (soap_pointer_enter(soap, p, NULL, 0, t, &pp))
+  else if (soap_pointer_enter(soap, p, nullptr, 0, t, &pp))
   { pp->mark1 = 0;
     pp->mark2 = 0;
   }
@@ -4547,7 +4547,7 @@ soap_init_iht(struct soap *soap)
 { int i;
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Initializing ID hashtable\n"));
   for (i = 0; i < SOAP_IDHASH; i++)
-    soap->iht[i] = NULL;
+    soap->iht[i] = nullptr;
 }
 #endif
 #endif
@@ -4570,7 +4570,7 @@ soap_free_iht(struct soap *soap)
       p = ip->next;
       SOAP_FREE(soap, ip);
     }
-    soap->iht[i] = NULL;
+    soap->iht[i] = nullptr;
   }
 }
 #endif
@@ -4587,7 +4587,7 @@ soap_lookup(struct soap *soap, const char *id)
   for (ip = soap->iht[soap_hash(id)]; ip; ip = ip->next)
     if (!strcmp(ip->id, id))
       return ip;
-  return NULL;
+  return nullptr;
 }
 #endif
 #endif
@@ -4609,7 +4609,7 @@ soap_enter(struct soap *soap, const char *id)
     soap->iht[h] = ip;
     return ip;
   }
-  return NULL;
+  return nullptr;
 }
 #endif
 #endif
@@ -4628,7 +4628,7 @@ soap_malloc(struct soap *soap, size_t n)
   n += (-(long)n) & 7;
   if (!(p = (char*)SOAP_MALLOC(soap, n + sizeof(void*) + sizeof(size_t))))
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   /* keep chain of alloced cells for later destruction */
   soap->alloced = 1;
@@ -4758,12 +4758,12 @@ soap_dealloc(struct soap *soap, void *p)
     DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Dealloc all data done\n"));
   }
   /* we must assume these were deallocated: */
-  soap->action = NULL;
-  soap->fault = NULL;
-  soap->header = NULL;
-  soap->userid = NULL;
-  soap->passwd = NULL;
-  soap->authrealm = NULL;
+  soap->action = nullptr;
+  soap->fault = nullptr;
+  soap->header = nullptr;
+  soap->userid = nullptr;
+  soap->passwd = nullptr;
+  soap->authrealm = nullptr;
 #ifndef WITH_LEANER
   soap_clr_mime(soap);
 #endif
@@ -4795,9 +4795,9 @@ soap_delete(struct soap *soap, void *p)
     { struct soap_clist *q = *cp;
       *cp = q->next;
       if (q->ptr == (void*)soap->fault)
-        soap->fault = NULL; /* this was deallocated */
+        soap->fault = nullptr; /* this was deallocated */
       else if (q->ptr == (void*)soap->header)
-        soap->header = NULL; /* this was deallocated */
+        soap->header = nullptr; /* this was deallocated */
       q->fdelete(q);
       SOAP_FREE(soap, q);
     }
@@ -4895,11 +4895,11 @@ soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, uns
     ip->type = t;
     ip->size = n;
     ip->link = p;
-    ip->copy = NULL;
-    ip->flist = NULL;
-    ip->ptr = NULL;
+    ip->copy = nullptr;
+    ip->flist = nullptr;
+    ip->ptr = nullptr;
     ip->level = k;
-    *p = NULL;
+    *p = nullptr;
   }
   else if (ip->ptr)
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Resolved href='%s' type=%d location=%p (%u bytes)\n", id, t, ip->ptr, (unsigned int)n));
@@ -4907,12 +4907,12 @@ soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, uns
     { strcpy(soap->id, id);
       soap->error = SOAP_HREF;
       DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility: id type=%d href type=%d\n", ip->type, t));
-      return NULL;
+      return nullptr;
     }
     while (ip->level < k)
     { q = (void**)soap_malloc(soap, sizeof(void*));
       if (!q)
-        return NULL;
+        return nullptr;
       *p = (void*)q;
       p = q;
       k--;
@@ -4932,9 +4932,9 @@ soap_id_lookup(struct soap *soap, const char *id, void **p, int t, size_t n, uns
         r = (void**)*r;
         q = (void**)s;
       }
-      *r = NULL;
+      *r = nullptr;
       ip->size = n;
-      ip->copy = NULL;
+      ip->copy = nullptr;
       ip->level = ip->level - 1;
       DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Descending one level...\n"));
     }
@@ -4975,24 +4975,24 @@ soap_id_forward(struct soap *soap, const char *href, void *p, int st, int tt, si
   { ip = soap_enter(soap, href); /* new hash table entry for string id */
     ip->type = st;
     ip->size = n;
-    ip->link = NULL;
-    ip->copy = NULL;
-    ip->ptr = NULL;
+    ip->link = nullptr;
+    ip->copy = nullptr;
+    ip->ptr = nullptr;
     ip->level = 0;
-    ip->flist = NULL;
+    ip->flist = nullptr;
     DBGLOG(TEST,SOAP_MESSAGE(fdebug, "New entry href='%s' type=%d size=%lu level=%d location=%p\n", href, st, (unsigned long)n, k, p));
   }
   else if (ip->type != st || (ip->level == k && ip->size != n))
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", href, ip->type, (unsigned long)ip->size, k, st, (unsigned long)n));
     strcpy(soap->id, href);
     soap->error = SOAP_HREF;
-    return NULL;
+    return nullptr;
   }
   if (fcopy || n < sizeof(void*) || *href != '#')
   { struct soap_flist *fp = (struct soap_flist*)SOAP_MALLOC(soap, sizeof(struct soap_flist));
     if (!fp)
     { soap->error = SOAP_EOM;
-      return NULL;
+      return nullptr;
     }
     fp->next = ip->flist;
     fp->type = tt;
@@ -5045,9 +5045,9 @@ soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsig
   if (!ip)
   { ip = soap_enter(soap, id); /* new hash table entry for string id */
     ip->type = t;
-    ip->link = NULL;
-    ip->copy = NULL;
-    ip->flist = NULL;
+    ip->link = nullptr;
+    ip->copy = nullptr;
+    ip->flist = nullptr;
     ip->size = n;
     ip->ptr = p;
     ip->level = k;
@@ -5057,13 +5057,13 @@ soap_id_enter(struct soap *soap, const char *id, void *p, int t, size_t n, unsig
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Type incompatibility id='%s' expect type=%d size=%lu level=%u got type=%d size=%lu\n", id, ip->type, (unsigned long)ip->size, k, t, (unsigned long)n));
     strcpy(soap->id, id);
     soap->error = SOAP_HREF;
-    return NULL;
+    return nullptr;
   }
   else if (ip->ptr)
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Multiply defined id='%s'\n", id));
     strcpy(soap->id, id);
     soap->error = SOAP_MULTI_ID;
-    return NULL;
+    return nullptr;
   }
   else
   { ip->size = n;
@@ -5099,17 +5099,17 @@ soap_end_send(struct soap *soap)
   { /* SOAP body referenced attachments must appear first */
     soap->dime.last->next = soap->dime.first;
     soap->dime.first = soap->dime.list->next;
-    soap->dime.list->next = NULL;
+    soap->dime.list->next = nullptr;
     soap->dime.last = soap->dime.list;
   }
   if (soap_putdime(soap) || soap_putmime(soap))
     return soap->error;
-  soap->mime.list = NULL;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
-  soap->dime.list = NULL;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
+  soap->mime.list = nullptr;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
+  soap->dime.list = nullptr;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
 #endif
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "End send\n"));
   if (soap->mode & SOAP_IO) /* need to flush the remaining data in buffer */
@@ -5221,14 +5221,14 @@ soap_end_recv(struct soap *soap)
   if ((soap->mode & SOAP_ENC_DIME) && soap_getdime(soap))
     return soap->error;
   soap->dime.list = soap->dime.first;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
   if ((soap->mode & SOAP_ENC_MIME) && soap_getmime(soap))
     return soap->error;
   soap->mime.list = soap->mime.first;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
-  soap->mime.boundary = NULL;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
+  soap->mime.boundary = nullptr;
 #endif
   DBGLOG(TEST,SOAP_MESSAGE(fdebug, "End of receive message ok\n"));
 #ifdef WITH_ZLIB
@@ -5325,13 +5325,13 @@ soap_free(struct soap *soap)
       { if (soap->encodingStyle == ns->out)
           soap->encodingStyle = SOAP_STR_EOS;
         SOAP_FREE(soap, ns->out);
-        ns->out = NULL;
+        ns->out = nullptr;
       }
       if (soap->encodingStyle == ns->ns)
         soap->encodingStyle = SOAP_STR_EOS;
     }
     SOAP_FREE(soap, soap->local_namespaces);
-    soap->local_namespaces = NULL;
+    soap->local_namespaces = nullptr;
   }
 #ifndef WITH_LEANER
   while (soap->xlist)
@@ -5454,33 +5454,33 @@ soap_copy_context(struct soap *copy, struct soap *soap)
   { struct soap_plugin *p;
     memcpy(copy, soap, sizeof(struct soap));
     copy->copy = 1;
-    copy->user = NULL;
+    copy->user = nullptr;
     copy->error = SOAP_OK;
-    copy->userid = NULL;
-    copy->passwd = NULL;
-    copy->nlist = NULL;
-    copy->blist = NULL;
-    copy->clist = NULL;
-    copy->alist = NULL;
-    copy->attributes = NULL;
+    copy->userid = nullptr;
+    copy->passwd = nullptr;
+    copy->nlist = nullptr;
+    copy->blist = nullptr;
+    copy->clist = nullptr;
+    copy->alist = nullptr;
+    copy->attributes = nullptr;
 #ifdef SOAP_DEBUG
     soap_init_mht(copy);
 #endif
-    copy->local_namespaces = NULL;
+    copy->local_namespaces = nullptr;
     soap_set_local_namespaces(copy);
 #ifndef WITH_NOIDREF
     soap_init_iht(copy);
     soap_init_pht(copy);
 #endif
-    copy->header = NULL;
-    copy->fault = NULL;
-    copy->action = NULL;
+    copy->header = nullptr;
+    copy->fault = nullptr;
+    copy->action = nullptr;
     *copy->host = '\0';
 #ifndef WITH_LEAN
 #ifdef WITH_COOKIES
     copy->cookies = soap_copy_cookies(copy);
 #else
-    copy->cookies = NULL;
+    copy->cookies = nullptr;
 #endif
 #endif
 #ifdef SOAP_DEBUG
@@ -5489,16 +5489,16 @@ soap_copy_context(struct soap *copy, struct soap *soap)
     soap_set_sent_logfile(copy, soap->logfile[SOAP_INDEX_SENT]);
     soap_set_test_logfile(copy, soap->logfile[SOAP_INDEX_TEST]);
 #endif
-    copy->plugins = NULL;
+    copy->plugins = nullptr;
     for (p = soap->plugins; p; p = p->next)
     { struct soap_plugin *q = (struct soap_plugin*)SOAP_MALLOC(copy, sizeof(struct soap_plugin));
       if (!q)
-        return NULL;
+        return nullptr;
       DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Copying plugin '%s'\n", p->id));
       *q = *p;
       if (p->fcopy && (soap->error = p->fcopy(copy, q, p)))
       { SOAP_FREE(copy, q);
-        return NULL;
+        return nullptr;
       }
       q->next = copy->plugins;
       copy->plugins = q;
@@ -5520,10 +5520,10 @@ soap_init(struct soap *soap)
   soap_imode(soap, SOAP_IO_DEFAULT);
   soap_omode(soap, SOAP_IO_DEFAULT);
   soap->copy = 0;
-  soap->plugins = NULL;
-  soap->user = NULL;
-  soap->userid = NULL;
-  soap->passwd = NULL;
+  soap->plugins = nullptr;
+  soap->user = nullptr;
+  soap->userid = nullptr;
+  soap->passwd = nullptr;
 #ifndef WITH_NOHTTP
   soap->fpost = http_post;
   soap->fget = http_get;
@@ -5532,8 +5532,8 @@ soap_init(struct soap *soap)
   soap->fparse = http_parse;
   soap->fparsehdr = http_parse_header;
 #endif
-  soap->fconnect = NULL;
-  soap->fdisconnect = NULL;
+  soap->fconnect = nullptr;
+  soap->fdisconnect = nullptr;
 #ifndef WITH_NOIO
 #ifndef WITH_IPV6
   soap->fresolve = tcp_gethost;
@@ -5554,27 +5554,27 @@ soap_init(struct soap *soap)
   soap->fpoll = NULL;
 #endif
 #ifndef WITH_LEANER
-  soap->fprepareinit = NULL;
-  soap->fpreparesend = NULL;
-  soap->fpreparerecv = NULL;
+  soap->fprepareinit = nullptr;
+  soap->fpreparesend = nullptr;
+  soap->fpreparerecv = nullptr;
 #endif
-  soap->fseterror = NULL;
-  soap->fignore = NULL;
-  soap->fserveloop = NULL;
+  soap->fseterror = nullptr;
+  soap->fignore = nullptr;
+  soap->fserveloop = nullptr;
   soap->fplugin = fplugin;
 #ifndef WITH_LEANER
-  soap->fdimereadopen = NULL;
-  soap->fdimewriteopen = NULL;
-  soap->fdimereadclose = NULL;
-  soap->fdimewriteclose = NULL;
-  soap->fdimeread = NULL;
-  soap->fdimewrite = NULL;
+  soap->fdimereadopen = nullptr;
+  soap->fdimewriteopen = nullptr;
+  soap->fdimereadclose = nullptr;
+  soap->fdimewriteclose = nullptr;
+  soap->fdimeread = nullptr;
+  soap->fdimewrite = nullptr;
 #endif
   soap->float_format = "%.8g"; /* .8 preserves single FP precision as much as possible, but might not be very efficient */
   soap->double_format = "%.17lg"; /* .17 preserves double FP precision as much as possible, but might not be very efficient */
   soap->dime_id_format = "cid:id%d"; /* default DIME id format */
   soap->http_version = "1.1";
-  soap->actor = NULL;
+  soap->actor = nullptr;
   soap->max_keep_alive = SOAP_MAXKEEPALIVE;
   soap->keep_alive = 0;
   soap->recv_timeout = 0;
@@ -5597,29 +5597,29 @@ soap_init(struct soap *soap)
 #else
   soap->namespaces = NULL;
 #endif
-  soap->local_namespaces = NULL;
-  soap->nlist = NULL;
-  soap->blist = NULL;
-  soap->clist = NULL;
-  soap->alist = NULL;
-  soap->attributes = NULL;
-  soap->header = NULL;
-  soap->fault = NULL;
+  soap->local_namespaces = nullptr;
+  soap->nlist = nullptr;
+  soap->blist = nullptr;
+  soap->clist = nullptr;
+  soap->alist = nullptr;
+  soap->attributes = nullptr;
+  soap->header = nullptr;
+  soap->fault = nullptr;
   soap->master = SOAP_INVALID_SOCKET;
   soap->socket = SOAP_INVALID_SOCKET;
-  soap->os = NULL;
-  soap->is = NULL;
+  soap->os = nullptr;
+  soap->is = nullptr;
 #ifndef WITH_LEANER
-  soap->dom = NULL;
-  soap->dime.list = NULL;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
-  soap->mime.list = NULL;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
-  soap->mime.boundary = NULL;
-  soap->mime.start = NULL;
-  soap->xlist = NULL;
+  soap->dom = nullptr;
+  soap->dime.list = nullptr;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
+  soap->mime.list = nullptr;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
+  soap->mime.boundary = nullptr;
+  soap->mime.start = nullptr;
+  soap->xlist = nullptr;
 #endif
 #ifndef UNDER_CE
   soap->recvfd = 0;
@@ -5630,13 +5630,13 @@ soap_init(struct soap *soap)
 #endif
   soap->host[0] = '\0';
   soap->port = 0;
-  soap->action = NULL;
-  soap->proxy_host = NULL;
+  soap->action = nullptr;
+  soap->proxy_host = nullptr;
   soap->proxy_port = 8080;
-  soap->proxy_userid = NULL;
-  soap->proxy_passwd = NULL;
-  soap->authrealm = NULL;
-  soap->prolog = NULL;
+  soap->proxy_userid = nullptr;
+  soap->proxy_passwd = nullptr;
+  soap->authrealm = nullptr;
+  soap->prolog = nullptr;
 #ifdef WITH_OPENSSL
   soap->fsslauth = ssl_auth_init;
   soap->fsslverify = ssl_verify_callback;
@@ -5664,9 +5664,9 @@ soap_init(struct soap *soap)
   soap->z_level = 6;
 #endif
 #ifndef WITH_LEAN
-  soap->cookies = NULL;
-  soap->cookie_domain = NULL;
-  soap->cookie_path = NULL;
+  soap->cookies = nullptr;
+  soap->cookie_domain = nullptr;
+  soap->cookie_path = nullptr;
   soap->cookie_max = 32;
 #endif
 #ifdef SOAP_DEBUG
@@ -5760,7 +5760,7 @@ SOAP_FMAC2
 soap_end(struct soap *soap)
 { struct soap_clist *cp;
   soap_free(soap);
-  soap_dealloc(soap, NULL);
+  soap_dealloc(soap, nullptr);
   while (soap->clist)
   { cp = soap->clist->next;
     SOAP_FREE(soap, soap->clist);
@@ -5786,14 +5786,14 @@ soap_set_namespaces(struct soap *soap, struct Namespace *p)
   struct soap_nlist *np, *nq, *nr;
   unsigned int level = soap->level;
   soap->namespaces = p;
-  soap->local_namespaces = NULL;
+  soap->local_namespaces = nullptr;
   soap_set_local_namespaces(soap);
   /* reverse the list */
   np = soap->nlist;
-  soap->nlist = NULL;
+  soap->nlist = nullptr;
   if (np)
   { nq = np->next;
-    np->next = NULL;
+    np->next = nullptr;
     while (nq)
     { nr = nq->next;
       nq->next = np;
@@ -5826,7 +5826,7 @@ soap_set_namespaces(struct soap *soap, struct Namespace *p)
     for (i = 0; ns[i].id; i++)
     { if (ns[i].out)
       { SOAP_FREE(soap, ns[i].out);
-        ns[i].out = NULL;
+        ns[i].out = nullptr;
       }
     }
     SOAP_FREE(soap, ns);
@@ -5973,7 +5973,7 @@ soap_element_begin_out(struct soap *soap, const char *tag, int id, const char *t
     return SOAP_OK;
   if (soap_element(soap, tag, id, type))
     return soap->error;
-  return soap_element_start_end_out(soap, NULL);
+  return soap_element_start_end_out(soap, nullptr);
 }
 #endif
 
@@ -6114,7 +6114,7 @@ soap_array_begin_out(struct soap *soap, const char *tag, int id, const char *typ
     if (type && *type && (soap_attribute(soap, "SOAP-ENC:arrayType", type)))
       return soap->error;
   }
-  return soap_element_start_end_out(soap, NULL);
+  return soap_element_start_end_out(soap, nullptr);
 }
 #endif
 
@@ -6219,7 +6219,7 @@ int
 SOAP_FMAC2
 soap_element_href(struct soap *soap, const char *tag, int id, const char *ref, const char *val)
 { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Element '%s' reference %s='%s'\n", tag, ref, val));
-  if (soap_element(soap, tag, id, NULL)
+  if (soap_element(soap, tag, id, nullptr)
    || soap_attribute(soap, ref, val)
    || soap_element_start_end_out(soap, tag))
     return soap->error;
@@ -6295,9 +6295,9 @@ int
 SOAP_FMAC2
 soap_element_result(struct soap *soap, const char *tag)
 { if (soap->version == 2 && soap->encodingStyle)
-    if (soap_element(soap, "SOAP-RPC:result", 0, NULL)
+    if (soap_element(soap, "SOAP-RPC:result", 0, nullptr)
      || soap_attribute(soap, "xmlns:SOAP-RPC", soap_rpc)
-     || soap_element_start_end_out(soap, NULL)
+     || soap_element_start_end_out(soap, nullptr)
      || soap_string_out(soap, tag, 0)
      || soap_element_end_out(soap, "SOAP-RPC:result"))
       return soap->error;
@@ -6454,7 +6454,7 @@ soap_attr_value(struct soap *soap, const char *name, int flag)
   }
   else if (flag == 1 && (soap->mode & SOAP_XML_STRICT))
     soap->error = SOAP_REQUIRED;
-  return NULL;
+  return nullptr;
 }
 #endif
 
@@ -6473,7 +6473,7 @@ soap_set_attr(struct soap *soap, const char *name, const char *value)
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Allocate attribute %s\n", name));
     if (!(tp = (struct soap_attribute*)SOAP_MALLOC(soap, sizeof(struct soap_attribute) + strlen(name))))
       return soap->error = SOAP_EOM;
-    tp->ns = NULL;
+    tp->ns = nullptr;
 #ifndef WITH_LEAN
     if (soap->mode & SOAP_XML_CANONICAL)
     { struct soap_attribute **tpp = &soap->attributes;
@@ -6510,13 +6510,13 @@ soap_set_attr(struct soap *soap, const char *name, const char *value)
       soap->attributes = tp;
     }
     strcpy(tp->name, name);
-    tp->value = NULL;
+    tp->value = nullptr;
   }
   else if (value && tp->value && tp->size <= strlen(value))
   { DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Free attribute value of %s (free %p)\n", name, tp->value));
     SOAP_FREE(soap, tp->value);
-    tp->value = NULL;
-    tp->ns = NULL;
+    tp->value = nullptr;
+    tp->ns = nullptr;
   }
   if (value)
   { if (!tp->value)
@@ -6757,7 +6757,7 @@ soap_peek_element(struct soap *soap)
     else if (!strcmp(soap->tmpbuf, "xmlns"))
       t = SOAP_STR_EOS;
     else
-      t = NULL;
+      t = nullptr;
     for (tp = soap->attributes; tp; tp = tp->next)
       if (!SOAP_STRCMP(tp->name, soap->tmpbuf))
         break;
@@ -6766,7 +6766,7 @@ soap_peek_element(struct soap *soap)
       if (!tp)
         return soap->error = SOAP_EOM;
       strcpy(tp->name, soap->tmpbuf);
-      tp->value = NULL;
+      tp->value = nullptr;
       tp->size = 0;
       tp->next = soap->attributes;
       soap->attributes = tp;
@@ -7039,7 +7039,7 @@ char *
 SOAP_FMAC2
 soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
 { char *s;
-  char *t = NULL;
+  char *t = nullptr;
   size_t i;
   long l = 0;
   int n = 0;
@@ -7267,7 +7267,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
   soap->labidx = 0;			/* use look-aside buffer */
 #else
   if (soap_new_block(soap))
-    return NULL;
+    return nullptr;
 #endif
   for (;;)
   {
@@ -7281,7 +7281,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
 #else
     size_t k = SOAP_BLKLEN;
     if (!(s = (char*)soap_push_block(soap, k)))
-      return NULL;
+      return nullptr;
 #endif
     for (i = 0; i < k; i++)
     { if (m > 0)
@@ -7426,7 +7426,7 @@ soap_string_in(struct soap *soap, int flag, long minlen, long maxlen)
       if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
       { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
         soap->error = SOAP_LENGTH;
-        return NULL;
+        return nullptr;
       }
     }
   }
@@ -7437,20 +7437,20 @@ end:
   t = soap_strdup(soap, soap->labbuf);
 #else
   soap_size_block(soap, i+1);
-  t = soap_save_block(soap, NULL, 0);
+  t = soap_save_block(soap, nullptr, 0);
 #endif
   if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
   { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
     soap->error = SOAP_LENGTH;
-    return NULL;
+    return nullptr;
   }
   if (flag == 2)
     if (soap_s2TQName(soap, t, &t))
-      return NULL;
+      return nullptr;
   if (soap->peeked && *soap->tag)
   { soap->peeked = 0;
-    if (soap_element_end_in(soap, NULL))
-      return NULL;
+    if (soap_element_end_in(soap, nullptr))
+      return nullptr;
   }
   return t;
 }
@@ -7537,22 +7537,22 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
   int i, n = 0;
   long l = 0;
   soap_wchar c;
-  const char *t = NULL;
+  const char *t = nullptr;
   DBGLOG(TEST,SOAP_MESSAGE(fdebug, "Reading wide string content\n"));
   if (soap->peeked && *soap->tag)
   { n = 1;
     soap->peeked = 0;
   }
   if (soap_new_block(soap))
-    return NULL;
+    return nullptr;
   for (;;)
   { if (!(s = (wchar_t*)soap_push_block(soap, sizeof(wchar_t)*SOAP_BLKLEN)))
-      return NULL;
+      return nullptr;
     for (i = 0; i < SOAP_BLKLEN; i++)
     { if (t)
       { *s++ = (wchar_t)*t++;
         if (!*t)
-          t = NULL;
+          t = nullptr;
         continue;
       }
       c = soap_getutf8(soap);
@@ -7620,7 +7620,7 @@ soap_wstring_in(struct soap *soap, int flag, long minlen, long maxlen)
       if ((soap->mode & SOAP_XML_STRICT) && maxlen >= 0 && l > maxlen)
       { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too long: maxlen=%ld\n", maxlen));
         soap->error = SOAP_LENGTH;
-        return NULL;
+        return nullptr;
       }
     }
   }
@@ -7631,14 +7631,14 @@ end:
   if ((soap->mode & SOAP_XML_STRICT) && l < minlen)
   { DBGLOG(TEST,SOAP_MESSAGE(fdebug, "String too short: %ld chars, minlen=%ld\n", l, minlen));
     soap->error = SOAP_LENGTH;
-    return NULL;
+    return nullptr;
   }
   if (soap->peeked && *soap->tag)
   { soap->peeked = 0;
-    if (soap_element_end_in(soap, NULL))
-      return NULL;
+    if (soap_element_end_in(soap, nullptr))
+      return nullptr;
   }
-  return (wchar_t*)soap_save_block(soap, NULL, 0);
+  return (wchar_t*)soap_save_block(soap, nullptr, 0);
 }
 #endif
 #endif
@@ -7695,7 +7695,7 @@ int *
 SOAP_FMAC2
 soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -7704,17 +7704,17 @@ soap_inint(struct soap *soap, const char *tag, int *p, const char *type, int t)
    && soap_match_tag(soap, soap->type, ":byte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, NULL, NULL, NULL);
+  p = (int*)soap_id_enter(soap, soap->id, p, t, sizeof(int), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2int(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(int), 0, NULL);
+  p = (int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(int), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -7772,7 +7772,7 @@ long *
 SOAP_FMAC2
 soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -7781,17 +7781,17 @@ soap_inlong(struct soap *soap, const char *tag, long *p, const char *type, int t
    && soap_match_tag(soap, soap->type, ":byte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, NULL, NULL, NULL);
+  p = (long*)soap_id_enter(soap, soap->id, p, t, sizeof(long), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2long(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(long), 0, NULL);
+  p = (long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(long), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -7853,7 +7853,7 @@ LONG64 *
 SOAP_FMAC2
 soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -7868,17 +7868,17 @@ soap_inLONG64(struct soap *soap, const char *tag, LONG64 *p, const char *type, i
    && soap_match_tag(soap, soap->type, ":byte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, NULL, NULL, NULL);
+  p = (LONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(LONG64), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2LONG64(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (LONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(LONG64), 0, NULL);
+  p = (LONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(LONG64), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -7931,24 +7931,24 @@ char *
 SOAP_FMAC2
 soap_inbyte(struct soap *soap, const char *tag, char *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
    && soap_match_tag(soap, soap->type, ":byte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, NULL, NULL, NULL);
+  p = (char*)soap_id_enter(soap, soap->id, p, t, sizeof(char), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2byte(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(char), 0, NULL);
+  p = (char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(char), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8001,7 +8001,7 @@ short *
 SOAP_FMAC2
 soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -8009,17 +8009,17 @@ soap_inshort(struct soap *soap, const char *tag, short *p, const char *type, int
    && soap_match_tag(soap, soap->type, ":byte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, NULL, NULL, NULL);
+  p = (short*)soap_id_enter(soap, soap->id, p, t, sizeof(short), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2short(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(short), 0, NULL);
+  p = (short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(short), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8131,19 +8131,19 @@ float *
 SOAP_FMAC2
 soap_infloat(struct soap *soap, const char *tag, float *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type != '\0' && soap_isnumeric(soap, type))
-    return NULL;
+    return nullptr;
 #endif
-  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, NULL, NULL, NULL);
+  p = (float*)soap_id_enter(soap, soap->id, p, t, sizeof(float), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2float(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (float*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(float), 0, NULL);
+  p = (float*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(float), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8223,19 +8223,19 @@ double *
 SOAP_FMAC2
 soap_indouble(struct soap *soap, const char *tag, double *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type != '\0' && soap_isnumeric(soap, type))
-    return NULL;
+    return nullptr;
 #endif
-  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, NULL, NULL, NULL);
+  p = (double*)soap_id_enter(soap, soap->id, p, t, sizeof(double), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2double(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (double*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(double), 0, NULL);
+  p = (double*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(double), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8288,24 +8288,24 @@ unsigned char *
 SOAP_FMAC2
 soap_inunsignedByte(struct soap *soap, const char *tag, unsigned char *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
    && soap_match_tag(soap, soap->type, ":unsignedByte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, NULL, NULL, NULL);
+  p = (unsigned char*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned char), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2unsignedByte(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned char), 0, NULL);
+  p = (unsigned char*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned char), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8358,7 +8358,7 @@ unsigned short *
 SOAP_FMAC2
 soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -8366,17 +8366,17 @@ soap_inunsignedShort(struct soap *soap, const char *tag, unsigned short *p, cons
    && soap_match_tag(soap, soap->type, ":unsignedByte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, NULL, NULL, NULL);
+  p = (unsigned short*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned short), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2unsignedShort(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned short), 0, NULL);
+  p = (unsigned short*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned short), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8433,7 +8433,7 @@ unsigned int *
 SOAP_FMAC2
 soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -8442,17 +8442,17 @@ soap_inunsignedInt(struct soap *soap, const char *tag, unsigned int *p, const ch
    && soap_match_tag(soap, soap->type, ":unsignedByte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, NULL, NULL, NULL);
+  p = (unsigned int*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned int), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2unsignedInt(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned int), 0, NULL);
+  p = (unsigned int*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned int), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8510,7 +8510,7 @@ unsigned long *
 SOAP_FMAC2
 soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
 #ifndef WITH_LEAN
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
@@ -8519,17 +8519,17 @@ soap_inunsignedLong(struct soap *soap, const char *tag, unsigned long *p, const
    && soap_match_tag(soap, soap->type, ":unsignedByte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
 #endif
-  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, NULL, NULL, NULL);
+  p = (unsigned long*)soap_id_enter(soap, soap->id, p, t, sizeof(unsigned long), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2unsignedLong(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned long), 0, NULL);
+  p = (unsigned long*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(unsigned long), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8591,7 +8591,7 @@ ULONG64 *
 SOAP_FMAC2
 soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
    && soap_match_tag(soap, soap->type, ":positiveInteger")
@@ -8602,16 +8602,16 @@ soap_inULONG64(struct soap *soap, const char *tag, ULONG64 *p, const char *type,
    && soap_match_tag(soap, soap->type, ":unsignedByte"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
-  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, NULL, NULL, NULL);
+  p = (ULONG64*)soap_id_enter(soap, soap->id, p, t, sizeof(ULONG64), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2ULONG64(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(ULONG64), 0, NULL);
+  p = (ULONG64*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(ULONG64), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8622,7 +8622,7 @@ SOAP_FMAC1
 int
 SOAP_FMAC2
 soap_s2string(struct soap *soap, const char *s, char **t)
-{ *t = NULL;
+{ *t = nullptr;
   if (s && !(*t = soap_strdup(soap, s)))
     soap->error = SOAP_EOM;
   return soap->error;
@@ -8736,7 +8736,7 @@ SOAP_FMAC1
 int
 SOAP_FMAC2
 soap_outstring(struct soap *soap, const char *tag, int id, char *const*p, const char *type, int n)
-{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+{ id = soap_element_id(soap, tag, id, *p, nullptr, 0, type, n);
   if (id < 0
    || soap_element_begin_out(soap, tag, id, type)
    || soap_string_out(soap, *p, 0)
@@ -8754,22 +8754,22 @@ SOAP_FMAC2
 soap_instring(struct soap *soap, const char *tag, char **p, const char *type, int t, int flag, long minlen, long maxlen)
 { if (soap_element_begin_in(soap, tag, 1))
   { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
-      return NULL;
+      return nullptr;
     soap->error = SOAP_OK;
   }
   if (!p)
     if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
-      return NULL;
+      return nullptr;
   if (soap->body)
   { *p = soap_string_in(soap, flag, minlen, maxlen);
-    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, NULL, NULL, NULL))
-      return NULL;
+    if (!*p || !(char*)soap_id_enter(soap, soap->id, *p, t, sizeof(char*), 0, nullptr, nullptr, nullptr))
+      return nullptr;
   }
   else
-    *p = NULL;
+    *p = nullptr;
   p = (char**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(char**), 0);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -8781,7 +8781,7 @@ SOAP_FMAC1
 int
 SOAP_FMAC2
 soap_outwstring(struct soap *soap, const char *tag, int id, wchar_t *const*p, const char *type, int n)
-{ id = soap_element_id(soap, tag, id, *p, NULL, 0, type, n);
+{ id = soap_element_id(soap, tag, id, *p, nullptr, 0, type, n);
   if (id < 0
    || soap_element_begin_out(soap, tag, id, type)
    || soap_wstring_out(soap, *p, 0)
@@ -8801,22 +8801,22 @@ SOAP_FMAC2
 soap_inwstring(struct soap *soap, const char *tag, wchar_t **p, const char *type, int t, long minlen, long maxlen)
 { if (soap_element_begin_in(soap, tag, 1))
   { if (!tag || *tag != '-' || soap->error != SOAP_NO_TAG)
-      return NULL;
+      return nullptr;
     soap->error = SOAP_OK;
   }
   if (!p)
     if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
-      return NULL;
+      return nullptr;
   if (soap->body)
   { *p = soap_wstring_in(soap, 1, minlen, maxlen);
-    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, NULL, NULL, NULL))
-      return NULL;
+    if (!*p || !(wchar_t*)soap_id_enter(soap, soap->id, *p, t, sizeof(wchar_t*), 0, nullptr, nullptr, nullptr))
+      return nullptr;
   }
   else
-    *p = NULL;
+    *p = nullptr;
   p = (wchar_t**)soap_id_lookup(soap, soap->href, (void**)p, t, sizeof(wchar_t**), 0);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -9028,22 +9028,22 @@ time_t *
 SOAP_FMAC2
 soap_indateTime(struct soap *soap, const char *tag, time_t *p, const char * type, int t)
 { if (soap_element_begin_in(soap, tag, 0))
-    return NULL;
+    return nullptr;
   if (*soap->type
    && soap_match_tag(soap, soap->type, type)
    && soap_match_tag(soap, soap->type, ":dateTime"))
   { soap->error = SOAP_TYPE;
     soap_revert(soap);
-    return NULL;
+    return nullptr;
   }
-  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, NULL, NULL, NULL);
+  p = (time_t*)soap_id_enter(soap, soap->id, p, t, sizeof(time_t), 0, nullptr, nullptr, nullptr);
   if (p)
   { if (soap_s2dateTime(soap, soap_value(soap), p))
-      return NULL;
+      return nullptr;
   }
-  p = (time_t*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(time_t), 0, NULL);
+  p = (time_t*)soap_id_forward(soap, soap->href, p, t, 0, sizeof(time_t), 0, nullptr);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -9055,7 +9055,7 @@ int
 SOAP_FMAC2
 soap_outliteral(struct soap *soap, const char *tag, char *const*p)
 { int i;
-  const char *t = NULL;
+  const char *t = nullptr;
   if (tag && *tag != '-')
   { if (soap->local_namespaces && (t = strchr(tag, ':')))
     { strncpy(soap->tmpbuf, tag, t-tag);
@@ -9093,18 +9093,18 @@ SOAP_FMAC2
 soap_inliteral(struct soap *soap, const char *tag, char **p)
 { if (soap_element_begin_in(soap, tag, 1))
   { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
-      return NULL;
+      return nullptr;
     soap->error = SOAP_OK;
   }
   if (!p)
     if (!(p = (char**)soap_malloc(soap, sizeof(char*))))
-      return NULL;
+      return nullptr;
   if (soap->null)
-    *p = NULL;
+    *p = nullptr;
   else
     *p = soap_string_in(soap, 0, -1, -1);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -9117,7 +9117,7 @@ int
 SOAP_FMAC2
 soap_outwliteral(struct soap *soap, const char *tag, wchar_t *const*p)
 { int i;
-  const char *t = NULL;
+  const char *t = nullptr;
   wchar_t c;
   const wchar_t *s;
   if (tag && *tag != '-')
@@ -9161,18 +9161,18 @@ SOAP_FMAC2
 soap_inwliteral(struct soap *soap, const char *tag, wchar_t **p)
 { if (soap_element_begin_in(soap, tag, 1))
   { if (soap->error != SOAP_NO_TAG || soap_unget(soap, soap_get(soap)) == SOAP_TT)
-      return NULL;
+      return nullptr;
     soap->error = SOAP_OK;
   }
   if (!p)
     if (!(p = (wchar_t**)soap_malloc(soap, sizeof(wchar_t*))))
-      return NULL;
+      return nullptr;
   if (soap->null)
-    *p = NULL;
+    *p = nullptr;
   else
     *p = soap_wstring_in(soap, 0, -1, -1);
   if (soap->body && soap_element_end_in(soap, tag))
-    return NULL;
+    return nullptr;
   return p;
 }
 #endif
@@ -9351,7 +9351,7 @@ char *
 SOAP_FMAC2
 soap_dime_option(struct soap *soap, unsigned short optype, const char *option)
 { size_t n;
-  char *s = NULL;
+  char *s = nullptr;
   if (option)
   { n = strlen(option);
     s = (char*)soap_malloc(soap, n + 5);
@@ -9448,9 +9448,9 @@ soap_putdime(struct soap *soap)
             break;
           if (soap->dime.id)
  	  { soap->dime.flags &= ~(SOAP_DIME_MB | SOAP_DIME_MEDIA);
-            soap->dime.id = NULL;
-            soap->dime.type = NULL;
-            soap->dime.options = NULL;
+            soap->dime.id = nullptr;
+            soap->dime.type = nullptr;
+            soap->dime.options = nullptr;
           }
         } while (size >= chunksize);
       }
@@ -9502,7 +9502,7 @@ soap_getdimefield(struct soap *soap, size_t n)
 { soap_wchar c;
   int i;
   char *s;
-  char *p = NULL;
+  char *p = nullptr;
   if (n)
   { p = (char*)soap_malloc(soap, n + 1);
     if (p)
@@ -9510,13 +9510,13 @@ soap_getdimefield(struct soap *soap, size_t n)
       for (i = n; i > 0; i--)
       { if ((int)(c = soap_get1(soap)) == EOF)
         { soap->error = SOAP_EOF;
-          return NULL;
+          return nullptr;
         }
         *s++ = (char)c;
       }
       *s = '\0';
       if ((soap->error = soap_move(soap, -(long)n&3)))
-        return NULL;
+        return nullptr;
     }
     else
       soap->error = SOAP_EOM;
@@ -9665,7 +9665,7 @@ end:
           return soap->error;
       }
       soap->dime.size = soap->blist->size++; /* allocate one more for '\0' */
-      if (!(soap->dime.ptr = soap_save_block(soap, NULL, 0)))
+      if (!(soap->dime.ptr = soap_save_block(soap, nullptr, 0)))
         return soap->error;
       soap->dime.ptr[soap->dime.size] = '\0'; /* force 0-terminated */
       soap->dime.id = id;
@@ -9719,7 +9719,7 @@ soap_getmimehdr(struct soap *soap)
     if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
       return soap->error;
   }
-  if (soap_set_mime_attachment(soap, NULL, 0, SOAP_MIME_NONE, NULL, NULL, NULL, NULL))
+  if (soap_set_mime_attachment(soap, nullptr, 0, SOAP_MIME_NONE, nullptr, nullptr, nullptr, nullptr))
     return soap->error = SOAP_EOM;
   content = soap->mime.last;
   for (;;)
@@ -9766,7 +9766,7 @@ soap_getmime(struct soap *soap)
     return SOAP_OK;
   for (;;)
   { size_t i, m = 0;
-    char *s, *t = NULL;
+    char *s, *t = nullptr;
     struct soap_multipart *content = soap->mime.last;
     DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Parsing MIME content id=%s type=%s\n", content->id?content->id:"", content->type?content->type:""));
     if (soap_new_block(soap))
@@ -9807,7 +9807,7 @@ soap_getmime(struct soap *soap)
 end:
     *s = '\0'; /* force 0-terminated */
     content->size = soap_size_block(soap, i+1)-1;
-    content->ptr = soap_save_block(soap, NULL, 0);
+    content->ptr = soap_save_block(soap, nullptr, 0);
     soap_resolve_attachment(soap, content);
     if (c == '-' && soap_getchar(soap) == '-')
       break;
@@ -9938,8 +9938,8 @@ void
 SOAP_FMAC2
 soap_set_dime(struct soap *soap)
 { soap->omode |= SOAP_ENC_DIME;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
 }
 #endif
 #endif
@@ -9952,8 +9952,8 @@ void
 SOAP_FMAC2
 soap_set_mime(struct soap *soap, const char *boundary, const char *start)
 { soap->omode |= SOAP_ENC_MIME;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
   soap->mime.boundary = soap_strdup(soap, boundary);
   soap->mime.start = soap_strdup(soap, start);
 }
@@ -9968,8 +9968,8 @@ void
 SOAP_FMAC2
 soap_clr_dime(struct soap *soap)
 { soap->omode &= ~SOAP_ENC_DIME;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
 }
 #endif
 #endif
@@ -9982,10 +9982,10 @@ void
 SOAP_FMAC2
 soap_clr_mime(struct soap *soap)
 { soap->omode &= ~SOAP_ENC_MIME;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
-  soap->mime.boundary = NULL;
-  soap->mime.start = NULL;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
+  soap->mime.boundary = nullptr;
+  soap->mime.start = nullptr;
 }
 #endif
 #endif
@@ -9998,15 +9998,15 @@ soap_new_multipart(struct soap *soap, struct soap_multipart **first, struct soap
 { struct soap_multipart *content;
   content = (struct soap_multipart*)soap_malloc(soap, sizeof(struct soap_multipart));
   if (content)
-  { content->next = NULL;
+  { content->next = nullptr;
     content->ptr = ptr;
     content->size = size;
-    content->id = NULL;
-    content->type = NULL;
-    content->options = NULL;
+    content->id = nullptr;
+    content->type = nullptr;
+    content->options = nullptr;
     content->encoding = SOAP_MIME_NONE;
-    content->location = NULL;
-    content->description = NULL;
+    content->location = nullptr;
+    content->description = nullptr;
     if (!*first)
       *first = content;
     if (*last)
@@ -10065,7 +10065,7 @@ SOAP_FMAC2
 soap_next_multipart(struct soap_multipart *content)
 { if (content)
     return content->next;
-  return NULL;
+  return nullptr;
 }
 #endif
 #endif
@@ -10796,19 +10796,19 @@ soap_begin_recv(struct soap *soap)
   soap->length = 0;
   soap->cdata = 0;
   *soap->endpoint = '\0';
-  soap->action = NULL;
+  soap->action = nullptr;
 #ifndef WITH_LEANER
   soap->dime.chunksize = 0;
   soap->dime.buflen = 0;
-  soap->dime.list = NULL;
-  soap->dime.first = NULL;
-  soap->dime.last = NULL;
-  soap->mime.list = NULL;
-  soap->mime.first = NULL;
-  soap->mime.last = NULL;
-  soap->mime.boundary = NULL;
-  soap->mime.start = NULL;
-  soap->xlist = NULL;
+  soap->dime.list = nullptr;
+  soap->dime.first = nullptr;
+  soap->dime.last = nullptr;
+  soap->mime.list = nullptr;
+  soap->mime.first = nullptr;
+  soap->mime.last = nullptr;
+  soap->mime.boundary = nullptr;
+  soap->mime.start = nullptr;
+  soap->xlist = nullptr;
 #endif
 #ifdef WIN32
 #ifndef UNDER_CE
@@ -10956,10 +10956,10 @@ http_parse(struct soap *soap)
   DBGLOG(TEST, SOAP_MESSAGE(fdebug, "Waiting for response...\n"));
   *soap->endpoint = '\0';
   soap->length = 0;
-  soap->userid = NULL;
-  soap->passwd = NULL;
-  soap->action = NULL;
-  soap->authrealm = NULL;
+  soap->userid = nullptr;
+  soap->passwd = nullptr;
+  soap->action = nullptr;
+  soap->authrealm = nullptr;
   do
   { if (soap_getline(soap, soap->msgbuf, sizeof(soap->msgbuf)))
       return soap->error;
@@ -11060,7 +11060,7 @@ http_parse_header(struct soap *soap, const char *key, const char *val)
   }
 #endif
   else if (!soap_tag_cmp(key, "Content-Length"))
-    soap->length = soap_strtoul(val, NULL, 10);
+    soap->length = soap_strtoul(val, nullptr, 10);
   else if (!soap_tag_cmp(key, "Content-Encoding"))
   { if (!soap_tag_cmp(val, "deflate"))
 #ifdef WITH_ZLIB
@@ -11118,8 +11118,8 @@ http_parse_header(struct soap *soap, const char *key, const char *val)
     soap->authrealm = soap_strdup(soap, soap_get_header_attribute(soap, val + 6, "realm"));
   else if (!soap_tag_cmp(key, "Expect"))
   { if (!soap_tag_cmp(val, "100-continue"))
-    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", NULL))
-       || (soap->error = soap->fposthdr(soap, NULL, NULL)))
+    { if ((soap->error = soap->fposthdr(soap, "HTTP/1.1 100 Continue", nullptr))
+       || (soap->error = soap->fposthdr(soap, nullptr, nullptr)))
         return soap->error;
     }
   }
@@ -11161,7 +11161,7 @@ soap_get_header_attribute(struct soap *soap, const char *line, const char *key)
         return soap->tmpbuf;
     }
   }
-  return NULL;
+  return nullptr;
 }
 #endif
 #endif
@@ -11258,7 +11258,7 @@ soap_envelope_begin_out(struct soap *soap)
   }
 #endif
   soap->part = SOAP_IN_ENVELOPE;
-  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, NULL);
+  return soap_element_begin_out(soap, "SOAP-ENV:Envelope", 0, nullptr);
 }
 #endif
 
@@ -11281,7 +11281,7 @@ soap_envelope_end_out(struct soap *soap)
       else
         soap->dime.type = (char*)soap->local_namespaces[0].ns;
     }
-    soap->dime.options = NULL;
+    soap->dime.options = nullptr;
     soap->dime.flags = SOAP_DIME_MB | SOAP_DIME_ABSURI;
     if (!soap->dime.first)
       soap->dime.flags |= SOAP_DIME_ME;
@@ -11351,11 +11351,11 @@ soap_body_begin_out(struct soap *soap)
 { soap->part = SOAP_IN_BODY;
   if (soap->version == 1)
     soap->encoding = 1;
-  if (soap_element(soap, "SOAP-ENV:Body", 0, NULL))
+  if (soap_element(soap, "SOAP-ENV:Body", 0, nullptr))
     return soap->error;
   if ((soap->mode & SOAP_XML_SEC) && soap_attribute(soap, "id", "_0"))
     return soap->error;
-  return soap_element_start_end_out(soap, NULL);
+  return soap_element_start_end_out(soap, nullptr);
 }
 #endif
 
@@ -11568,7 +11568,7 @@ soap_s2base64(struct soap *soap, const unsigned char *s, char *t, size_t n)
     t = (char*)soap_malloc(soap, (n + 2) / 3 * 4 + 1);
   if (!t)
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   p = t;
   t[0] = '\0';
@@ -11614,7 +11614,7 @@ soap_base642s(struct soap *soap, const char *s, char *t, size_t l, int *n)
   }
   if (!t)
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   p = t;
   if (n)
@@ -11674,7 +11674,7 @@ soap_s2hex(struct soap *soap, const unsigned char *s, char *t, size_t n)
     t = (char*)soap_malloc(soap, 2 * n + 1);
   if (!t)
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   p = t;
   t[0] = '\0';
@@ -11704,7 +11704,7 @@ soap_hex2s(struct soap *soap, const char *s, char *t, size_t l, int *n)
   }
   if (!t)
   { soap->error = SOAP_EOM;
-    return NULL;
+    return nullptr;
   }
   p = t;
   while (l > 1)
@@ -11728,7 +11728,7 @@ SOAP_FMAC2
 soap_puthttphdr(struct soap *soap, int status, size_t count)
 { const char *s;
 #ifndef WITH_LEANER
-  const char *r = NULL;
+  const char *r = nullptr;
 #endif
   int err;
   if (status == SOAP_FILE && soap->http_content)
@@ -11831,7 +11831,7 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
     sprintf(soap->tmpbuf, "%s %s HTTP/%s", s, endpoint, soap->http_version);
   else
     sprintf(soap->tmpbuf, "%s /%s HTTP/%s", s, (*path == '/' ? path + 1 : path), soap->http_version);
-  if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+  if ((err = soap->fposthdr(soap, soap->tmpbuf, nullptr)))
     return err;
   if (port != 80)
     sprintf(soap->tmpbuf, "%s:%d", host, port);
@@ -11879,7 +11879,7 @@ http_post(struct soap *soap, const char *endpoint, const char *host, int port, c
     if ((err = soap->fposthdr(soap, "SOAPAction", soap->tmpbuf)))
       return err;
   }
-  return soap->fposthdr(soap, NULL, NULL);
+  return soap->fposthdr(soap, nullptr, nullptr);
 }
 #endif
 #endif
@@ -11937,7 +11937,7 @@ http_response(struct soap *soap, int status, size_t count)
     if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
 #endif /* WMW_RPM_IO */
     { sprintf(soap->tmpbuf, "HTTP/%s 200 OK", soap->http_version);
-      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, nullptr)))
         return err;
     }
     else if ((err = soap->fposthdr(soap, "Status", "200 OK")))
@@ -11945,7 +11945,7 @@ http_response(struct soap *soap, int status, size_t count)
   }
   else if (status > 200 && status < 600)
   { sprintf(soap->tmpbuf, "HTTP/%s %d %s", soap->http_version, status, http_error(soap, status));
-    if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+    if ((err = soap->fposthdr(soap, soap->tmpbuf, nullptr)))
       return err;
 #ifndef WITH_LEAN
     if (status == 401)
@@ -11972,7 +11972,7 @@ http_response(struct soap *soap, int status, size_t count)
     if (soap_valid_socket(soap->master) || soap_valid_socket(soap->socket)) /* standalone application */
 #endif /* WMW_RPM_IO */
     { sprintf(soap->tmpbuf, "HTTP/%s %s", soap->http_version, s);
-      if ((err = soap->fposthdr(soap, soap->tmpbuf, NULL)))
+      if ((err = soap->fposthdr(soap, soap->tmpbuf, nullptr)))
         return err;
     }
     else if ((err = soap->fposthdr(soap, "Status", s)))
@@ -11985,7 +11985,7 @@ http_response(struct soap *soap, int status, size_t count)
   if (soap_putsetcookies(soap))
     return soap->error;
 #endif
-  return soap->fposthdr(soap, NULL, NULL);
+  return soap->fposthdr(soap, nullptr, nullptr);
 }
 #endif
 #endif
@@ -12067,7 +12067,7 @@ soap_set_fault(struct soap *soap)
       *s = "Server fault";
       break;
     case SOAP_TAG_MISMATCH:
-      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", NULL);
+      *s = soap_set_validation_fault(soap, "tag name or namespace mismatch", nullptr);
       break;
     case SOAP_TYPE:
       *s = soap_set_validation_fault(soap, "data type mismatch ", soap->type);
@@ -12092,7 +12092,7 @@ soap_set_fault(struct soap *soap)
       *s = "Unsupported SOAP data encoding";
       break;
     case SOAP_NAMESPACE:
-      *s = soap_set_validation_fault(soap, "namespace mismatch", NULL);
+      *s = soap_set_validation_fault(soap, "namespace mismatch", nullptr);
       break;
     case SOAP_FATAL_ERROR:
       *s = "Fatal error";
@@ -12111,7 +12111,7 @@ soap_set_fault(struct soap *soap)
       *s = "Array index out of bounds";
       break;
     case SOAP_NULL:
-      *s = soap_set_validation_fault(soap, "nil not allowed", NULL);
+      *s = soap_set_validation_fault(soap, "nil not allowed", nullptr);
       break;
     case SOAP_MULTI_ID:
       *s = soap_set_validation_fault(soap, "multiple definitions of id ", soap->id);
@@ -12175,16 +12175,16 @@ soap_set_fault(struct soap *soap)
 #endif
       break;
     case SOAP_REQUIRED:
-      *s = soap_set_validation_fault(soap, "missing required attribute", NULL);
+      *s = soap_set_validation_fault(soap, "missing required attribute", nullptr);
       break;
     case SOAP_PROHIBITED:
-      *s = soap_set_validation_fault(soap, "prohibited attribute present", NULL);
+      *s = soap_set_validation_fault(soap, "prohibited attribute present", nullptr);
       break;
     case SOAP_OCCURS:
-      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", NULL);
+      *s = soap_set_validation_fault(soap, "min/maxOccurs violation", nullptr);
       break;
     case SOAP_LENGTH:
-      *s = soap_set_validation_fault(soap, "content length violation", NULL);
+      *s = soap_set_validation_fault(soap, "content length violation", nullptr);
       break;
     case SOAP_STOP:
       *s = "Stopped: no response sent";
@@ -12240,7 +12240,7 @@ soap_send_fault(struct soap *soap)
     FD_ZERO(&sfd);
     FD_SET((SOAP_SOCKET)soap->socket, &rfd);
     FD_SET((SOAP_SOCKET)soap->socket, &sfd);
-    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, NULL, &timeout);
+    r = select((SOAP_SOCKET)(soap->socket + 1), &rfd, &sfd, nullptr, &timeout);
     if (r > 0)
     { if (!FD_ISSET((SOAP_SOCKET)soap->socket, &sfd)
        || (FD_ISSET((SOAP_SOCKET)soap->socket, &rfd)
@@ -12405,7 +12405,7 @@ soap_set_receiver_error(struct soap *soap, const char *faultstring, const char *
 #ifndef PALM_2
 static int
 soap_copy_fault(struct soap *soap, const char *faultcode, const char *faultstring, const char *faultdetail)
-{ char *s = NULL, *t = NULL;
+{ char *s = nullptr, *t = nullptr;
   if (faultstring)
     s = soap_strdup(soap, faultstring);
   if (faultdetail)
@@ -12497,10 +12497,10 @@ soap_register_plugin_arg(struct soap *soap, int (*fcreate)(struct soap*, struct
   int r;
   if (!(p = (struct soap_plugin*)SOAP_MALLOC(soap, sizeof(struct soap_plugin))))
     return soap->error = SOAP_EOM;
-  p->id = NULL;
-  p->data = NULL;
-  p->fcopy = NULL;
-  p->fdelete = NULL;
+  p->id = nullptr;
+  p->data = nullptr;
+  p->fcopy = nullptr;
+  p->fdelete = nullptr;
   r = fcreate(soap, p, arg);
   if (!r && p->fdelete)
   { p->next = soap->plugins;
@@ -12522,7 +12522,7 @@ fplugin(struct soap *soap, const char *id)
   for (p = soap->plugins; p; p = p->next)
     if (p->id == id || !strcmp(p->id, id))
       return p->data;
-  return NULL;
+  return nullptr;
 }
 #endif
 
-- 
cgit v1.2.3

