[BACK]Return to vis.c CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libc / gen

Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.

Diff for /src/lib/libc/gen/vis.c between version 1.73 and 1.74

version 1.73, 2017/04/23 01:58:48 version 1.74, 2017/11/27 16:37:21
Line 432  istrsenvisx(char **mbdstp, size_t *dlen,
Line 432  istrsenvisx(char **mbdstp, size_t *dlen,
         mdst = NULL;          mdst = NULL;
         if ((psrc = calloc(mbslength + 1, sizeof(*psrc))) == NULL)          if ((psrc = calloc(mbslength + 1, sizeof(*psrc))) == NULL)
                 return -1;                  return -1;
         if ((pdst = calloc((4 * mbslength) + 1, sizeof(*pdst))) == NULL)          if ((pdst = calloc((16 * mbslength) + 1, sizeof(*pdst))) == NULL)
                 goto out;                  goto out;
         if (*mbdstp == NULL) {          if (*mbdstp == NULL) {
                 if ((mdst = calloc((4 * mbslength) + 1, sizeof(*mdst))) == NULL)                  if ((mdst = calloc((16 * mbslength) + 1, sizeof(*mdst))) == NULL)
                         goto out;                          goto out;
                 *mbdstp = mdst;                  *mbdstp = mdst;
         }          }
Line 468  istrsenvisx(char **mbdstp, size_t *dlen,
Line 468  istrsenvisx(char **mbdstp, size_t *dlen,
                         clen = 1;                          clen = 1;
                         cerr = 1;                          cerr = 1;
                 }                  }
                 if (clen == 0)                  if (clen == 0) {
                         /*                          /*
                          * NUL in input gives 0 return value. process                           * NUL in input gives 0 return value. process
                          * as single NUL byte and keep going.                           * as single NUL byte and keep going.
                          */                           */
                         clen = 1;                          clen = 1;
                   }
                 /* Advance buffer character pointer. */                  /* Advance buffer character pointer. */
                 src++;                  src++;
                 /* Advance input pointer by number of bytes read. */                  /* Advance input pointer by number of bytes read. */

Legend:
Removed from v.1.73  
changed lines
  Added in v.1.74

CVSweb <webmaster@jp.NetBSD.org>