Lines Matching full:pi

160 __printf_out(struct __printf_io *io, const struct printf_info *pi, const void *ptr, int len)  in __printf_out()  argument
164 if ((!pi->left) && pi->width > len) in __printf_out()
165 ret += __printf_pad(io, pi->width - len, pi->pad == '0'); in __printf_out()
167 if (pi->left && pi->width > len) in __printf_out()
168 ret += __printf_pad(io, pi->width - len, pi->pad == '0'); in __printf_out()
176 __printf_arginfo_pct(const struct printf_info *pi __unused, size_t n __unused, int *argt __unused) in __printf_arginfo_pct()
183 __printf_render_pct(struct __printf_io *io, const struct printf_info *pi __unused, const void *cons… in __printf_render_pct()
192 __printf_arginfo_n(const struct printf_info *pi, size_t n, int *argt) in __printf_arginfo_n() argument
206 __printf_render_n(FILE *io __unused, const struct printf_info *pi, const void *const *arg) in __printf_render_n() argument
209 if (pi->is_char) in __printf_render_n()
210 **((signed char **)arg[0]) = (signed char)pi->sofar; in __printf_render_n()
211 else if (pi->is_short) in __printf_render_n()
212 **((short **)arg[0]) = (short)pi->sofar; in __printf_render_n()
213 else if (pi->is_long) in __printf_render_n()
214 **((long **)arg[0]) = pi->sofar; in __printf_render_n()
215 else if (pi->is_long_double) in __printf_render_n()
216 **((long long **)arg[0]) = pi->sofar; in __printf_render_n()
217 else if (pi->is_intmax) in __printf_render_n()
218 **((intmax_t **)arg[0]) = pi->sofar; in __printf_render_n()
219 else if (pi->is_ptrdiff) in __printf_render_n()
220 **((ptrdiff_t **)arg[0]) = pi->sofar; in __printf_render_n()
221 else if (pi->is_quad) in __printf_render_n()
222 **((quad_t **)arg[0]) = pi->sofar; in __printf_render_n()
223 else if (pi->is_size) in __printf_render_n()
224 **((size_t **)arg[0]) = pi->sofar; in __printf_render_n()
226 **((int **)arg[0]) = pi->sofar; in __printf_render_n()
267 struct printf_info *pi, *pil; in __v2printf() local
286 for (pi = pia; ; pi++) { in __v2printf()
287 memset(pi, 0, sizeof *pi); in __v2printf()
288 pil = pi; in __v2printf()
291 pil = pi + 1; in __v2printf()
292 pi->prec = -1; in __v2printf()
293 pi->pad = ' '; in __v2printf()
294 pi->begin = pi->end = fmt; in __v2printf()
296 pi->end = ++fmt; in __v2printf()
301 pi->spec = *fmt; in __v2printf()
302 switch (pi->spec) { in __v2printf()
309 if (pi->showsign == 0) in __v2printf()
310 pi->showsign = ' '; in __v2printf()
314 pi->alt = 1; in __v2printf()
318 pi->prec = 0; in __v2printf()
322 pi->get_prec = nextarg; in __v2printf()
327 pi->prec *= 10; in __v2printf()
328 pi->prec += to_digit(*fmt); in __v2printf()
333 pi->left = 1; in __v2printf()
337 pi->showsign = '+'; in __v2printf()
342 pi->get_width = nextarg; in __v2printf()
349 pi->group = 1; in __v2printf()
358 pi->pad = '0'; in __v2printf()
376 pi->width = n; in __v2printf()
381 pi->spec += ('a' - 'A'); in __v2printf()
382 pi->is_intmax = 0; in __v2printf()
383 if (pi->is_long_double || pi->is_quad) { in __v2printf()
384 pi->is_long = 0; in __v2printf()
385 pi->is_long_double = 1; in __v2printf()
387 pi->is_long = 1; in __v2printf()
388 pi->is_long_double = 0; in __v2printf()
393 pi->is_intmax = 1; in __v2printf()
397 pi->is_long = 0; in __v2printf()
398 pi->is_quad = 1; in __v2printf()
402 pi->is_long_double = 1; in __v2printf()
409 pi->is_char = 1; in __v2printf()
411 pi->is_short = 1; in __v2printf()
418 pi->is_long_double = 1; in __v2printf()
419 pi->is_quad = 0; in __v2printf()
421 pi->is_quad = 0; in __v2printf()
422 pi->is_long = 1; in __v2printf()
426 pi->is_ptrdiff = 1; in __v2printf()
430 pi->is_size = 1; in __v2printf()
437 if (printf_tbl[pi->spec].arginfo == NULL) in __v2printf()
438 errx(1, "arginfo[%c] = NULL", pi->spec); in __v2printf()
439 ch = printf_tbl[pi->spec].arginfo( in __v2printf()
440 pi, __PRINTFMAXARG, &argt[nextarg]); in __v2printf()
442 pi->arg[0] = &args[nextarg]; in __v2printf()
444 pi->arg[1] = &args[nextarg + 1]; in __v2printf()
514 for (pi = pia; pi < pil; pi++) { in __v2printf()
516 fprintf(stderr, "pi %p", pi); in __v2printf()
517 fprintf(stderr, " spec '%c'", pi->spec); in __v2printf()
519 ((uintptr_t)pi->arg[0] - (uintptr_t)args) / sizeof args[0]); in __v2printf()
520 if (pi->width) fprintf(stderr, " width %d", pi->width); in __v2printf()
521 if (pi->pad) fprintf(stderr, " pad 0x%x", pi->pad); in __v2printf()
522 if (pi->left) fprintf(stderr, " left"); in __v2printf()
523 if (pi->showsign) fprintf(stderr, " showsign"); in __v2printf()
524 if (pi->prec != -1) fprintf(stderr, " prec %d", pi->prec); in __v2printf()
525 if (pi->is_char) fprintf(stderr, " char"); in __v2printf()
526 if (pi->is_short) fprintf(stderr, " short"); in __v2printf()
527 if (pi->is_long) fprintf(stderr, " long"); in __v2printf()
528 if (pi->is_long_double) fprintf(stderr, " long_double"); in __v2printf()
530 fprintf(stderr, "\t\"%.*s\"\n", pi->end - pi->begin, pi->begin); in __v2printf()
532 if (pi->get_width) { in __v2printf()
533 pi->width = args[pi->get_width].intarg; in __v2printf()
540 if (pi->width < 0) { in __v2printf()
541 pi->left = 1; in __v2printf()
542 pi->width = -pi->width; in __v2printf()
545 if (pi->get_prec) in __v2printf()
546 pi->prec = args[pi->get_prec].intarg; in __v2printf()
547 ret += __printf_puts(&io, pi->begin, pi->end - pi->begin); in __v2printf()
548 if (printf_tbl[pi->spec].gnurender != NULL) { in __v2printf()
550 pi->sofar = ret; in __v2printf()
551 ret += printf_tbl[pi->spec].gnurender( in __v2printf()
552 fp, pi, (const void *)pi->arg); in __v2printf()
553 } else if (printf_tbl[pi->spec].render != NULL) { in __v2printf()
554 pi->sofar = ret; in __v2printf()
555 n = printf_tbl[pi->spec].render( in __v2printf()
556 &io, pi, (const void *)pi->arg); in __v2printf()
561 } else if (pi->begin == pi->end) in __v2printf()