Lines Matching refs:buf

59 nxt_sprintf(u_char *buf, u_char *end, const char *fmt, ...)  in nxt_sprintf()  argument
65 p = nxt_vsprintf(buf, end, fmt, args); in nxt_sprintf()
88 static u_char *nxt_integer(nxt_sprintf_t *spf, u_char *buf, uint64_t ui64);
89 static u_char *nxt_number(nxt_sprintf_t *spf, u_char *buf, double n);
98 nxt_vsprintf(u_char *buf, u_char *end, const char *fmt, va_list args) in nxt_vsprintf() argument
123 while (*fmt != '\0' && buf < end) { in nxt_vsprintf()
131 *buf++ = *fmt++; in nxt_vsprintf()
162 while (*p != '\0' && buf < end) { in nxt_vsprintf()
163 *buf++ = *p++; in nxt_vsprintf()
250 *buf++ = '('; in nxt_vsprintf()
253 buf = nxt_integer(&spf, buf, err); in nxt_vsprintf()
255 if (buf < end - 1) { in nxt_vsprintf()
256 *buf++ = ':'; in nxt_vsprintf()
257 *buf++ = ' '; in nxt_vsprintf()
260 buf = nxt_strerror(err, buf, end - buf); in nxt_vsprintf()
262 if (buf < end) { in nxt_vsprintf()
263 *buf++ = ')'; in nxt_vsprintf()
378 *buf++ = '-'; in nxt_vsprintf()
413 buf = nxt_number(&spf, buf, i); in nxt_vsprintf()
417 if (buf < end) { in nxt_vsprintf()
418 *buf++ = '.'; in nxt_vsprintf()
423 buf = nxt_integer(&spf, buf, frac); in nxt_vsprintf()
429 if (!nxt_double_is_zero(f) && buf < end) { in nxt_vsprintf()
430 *buf++ = '.'; in nxt_vsprintf()
432 while (!nxt_double_is_zero(f) && buf < end) { in nxt_vsprintf()
435 *buf++ = (u_char) i + '0'; in nxt_vsprintf()
459 *buf++ = (u_char) (d & 0xFF); in nxt_vsprintf()
479 while (*p != '\0' && buf < end) { in nxt_vsprintf()
480 *buf++ = *p++; in nxt_vsprintf()
521 *buf++ = '\0'; in nxt_vsprintf()
526 *buf++ = '\n'; in nxt_vsprintf()
531 *buf++ = '%'; in nxt_vsprintf()
536 *buf++ = *fmt++; in nxt_vsprintf()
544 *buf++ = '-'; in nxt_vsprintf()
552 buf = nxt_integer(&spf, buf, ui64); in nxt_vsprintf()
564 length = nxt_min((size_t) (end - buf), length); in nxt_vsprintf()
567 buf = nxt_cpymem(buf, p, length); in nxt_vsprintf()
571 return buf; in nxt_vsprintf()
576 nxt_integer(nxt_sprintf_t *spf, u_char *buf, uint64_t ui64) in nxt_integer() argument
665 end = buf + (spf->width - length); in nxt_integer()
668 while (buf < end) { in nxt_integer()
669 *buf++ = spf->padding; in nxt_integer()
676 end = buf + length; in nxt_integer()
679 while (buf < end) { in nxt_integer()
680 *buf++ = *p++; in nxt_integer()
683 return buf; in nxt_integer()
688 nxt_number(nxt_sprintf_t *spf, u_char *buf, double n) in nxt_number() argument
705 end = buf + (spf->width - length); in nxt_number()
708 while (buf < end) { in nxt_number()
709 *buf++ = spf->padding; in nxt_number()
717 end = buf + length; in nxt_number()
720 while (buf < end) { in nxt_number()
721 *buf++ = *p++; in nxt_number()
724 return buf; in nxt_number()