pike.git / src / stralloc.c

version» Context lines:

pike.git/src/stralloc.c:3066:    val = -val;    } else if (flags & APPEND_SIGNED) {    string_builder_putchar(s, '+');    }    if ((val+val == val) && (val > 0.0)) {    /* Infinity */    string_builder_strcat(s, "inf");    break;    }    /* FIXME: Field lengths and precision. */ -  if ((bytes = SNPRINTF(NULL, 0, nfmt, val))) { +  if ((bytes = snprintf(NULL, 0, nfmt, val))) {    p_wchar0 *p = string_builder_allocate(s, bytes, 0); -  size_t check = SNPRINTF((char*)p, bytes+1, nfmt, val); +  size_t check = snprintf((char*)p, bytes+1, nfmt, val);    if (check != bytes) {    Pike_fatal("string_builder_vsprintf(): snprintf(\"%s\", %f) "    "is not trustworthy: "    "%"PRINTSIZET"u != %"PRINTSIZET"u\n",    nfmt, val, bytes, check);    }    if (s->s->size_shift) {    /* We need to widen the string we just wrote. */    if (s->s->size_shift == 1) {    p_wchar1 *p1 = (p_wchar1 *)p;