Lines Matching refs:spf

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);
112 nxt_sprintf_t spf; in nxt_vsprintf() local
121 spf.end = end; in nxt_vsprintf()
186 spf.hex = NULL; in nxt_vsprintf()
187 spf.width = 0; in nxt_vsprintf()
188 spf.frac_width = -1; in nxt_vsprintf()
189 spf.max_width = 0; in nxt_vsprintf()
190 spf.padding = (*fmt == '0') ? '0' : ' '; in nxt_vsprintf()
198 spf.width = spf.width * 10 + (*fmt++ - '0'); in nxt_vsprintf()
211 spf.max_width = 1; in nxt_vsprintf()
216 spf.hex = HEXADECIMAL; in nxt_vsprintf()
222 spf.hex = hexadecimal; in nxt_vsprintf()
229 spf.frac_width = 0; in nxt_vsprintf()
232 spf.frac_width = spf.frac_width * 10 + *fmt++ - '0'; in nxt_vsprintf()
251 spf.hex = NULL; in nxt_vsprintf()
252 spf.width = 0; in nxt_vsprintf()
253 buf = nxt_integer(&spf, buf, err); in nxt_vsprintf()
281 if ((nxt_msec_int_t) ms == -1 && spf.hex == NULL) { in nxt_vsprintf()
316 if (spf.max_width != 0) { in nxt_vsprintf()
317 spf.width = NXT_INT_T_LEN; in nxt_vsprintf()
361 if (spf.max_width != 0) { in nxt_vsprintf()
362 spf.width = NXT_ATOMIC_T_LEN; in nxt_vsprintf()
398 if (spf.frac_width > 0) { in nxt_vsprintf()
401 for (n = spf.frac_width; n != 0; n--) { in nxt_vsprintf()
413 buf = nxt_number(&spf, buf, i); in nxt_vsprintf()
415 if (spf.frac_width > 0) { in nxt_vsprintf()
420 spf.hex = NULL; in nxt_vsprintf()
421 spf.padding = '0'; in nxt_vsprintf()
422 spf.width = spf.frac_width; in nxt_vsprintf()
423 buf = nxt_integer(&spf, buf, frac); in nxt_vsprintf()
426 } else if (spf.frac_width < 0) { in nxt_vsprintf()
450 spf.hex = HEXADECIMAL; in nxt_vsprintf()
512 spf.hex = HEXADECIMAL; in nxt_vsprintf()
552 buf = nxt_integer(&spf, buf, ui64); in nxt_vsprintf()
576 nxt_integer(nxt_sprintf_t *spf, u_char *buf, uint64_t ui64) in nxt_integer() argument
584 if (spf->hex == NULL) { in nxt_integer()
655 *(--p) = spf->hex[ui64 & 0xF]; in nxt_integer()
662 if (spf->width != 0) { in nxt_integer()
665 end = buf + (spf->width - length); in nxt_integer()
666 end = nxt_min(end, spf->end); in nxt_integer()
669 *buf++ = spf->padding; in nxt_integer()
677 end = nxt_min(end, spf->end); in nxt_integer()
688 nxt_number(nxt_sprintf_t *spf, u_char *buf, double n) in nxt_number() argument
703 if (spf->width != 0) { in nxt_number()
705 end = buf + (spf->width - length); in nxt_number()
706 end = nxt_min(end, spf->end); in nxt_number()
709 *buf++ = spf->padding; in nxt_number()
718 end = nxt_min(end, spf->end); in nxt_number()