Lines Matching refs:info

22 	void (*putc)(struct printf_info *info, char ch);
25 static void out(struct printf_info *info, char c) in out() argument
27 *info->bf++ = c; in out()
30 static void out_dgt(struct printf_info *info, char dgt) in out_dgt() argument
32 out(info, dgt + (dgt < 10 ? '0' : 'a' - 10)); in out_dgt()
33 info->zs = 1; in out_dgt()
36 static void div_out(struct printf_info *info, unsigned long *num, in div_out() argument
46 if (info->zs || dgt > 0) in div_out()
47 out_dgt(info, dgt); in div_out()
51 static void string(struct printf_info *info, char *s) in string() argument
56 out(info, ch); in string()
70 static void mac_address_string(struct printf_info *info, u8 *addr, in mac_address_string() argument
85 string(info, mac_addr); in mac_address_string()
124 static void ip4_addr_string(struct printf_info *info, u8 *addr) in ip4_addr_string() argument
142 string(info, ip4_addr); in ip4_addr_string()
160 static void __maybe_unused pointer(struct printf_info *info, const char *fmt, in pointer() argument
182 return mac_address_string(info, ptr, false); in pointer()
184 return mac_address_string(info, ptr, true); in pointer()
187 return ip4_addr_string(info, ptr); in pointer()
195 div_out(info, &num, div); in pointer()
199 static int _vprintf(struct printf_info *info, const char *fmt, va_list va) in _vprintf() argument
209 info->putc(info, ch); in _vprintf()
236 info->bf = buf; in _vprintf()
237 p = info->bf; in _vprintf()
238 info->zs = 0; in _vprintf()
258 out(info, '-'); in _vprintf()
261 out(info, '-'); in _vprintf()
265 out_dgt(info, 0); in _vprintf()
268 div_out(info, &num, div); in _vprintf()
273 pointer(info, fmt, va_arg(va, void *)); in _vprintf()
295 out_dgt(info, 0); in _vprintf()
298 div_out(info, &num, div); in _vprintf()
302 out(info, (char)(va_arg(va, int))); in _vprintf()
308 out(info, '%'); in _vprintf()
313 *info->bf = 0; in _vprintf()
314 info->bf = p; in _vprintf()
315 while (*info->bf++ && width > 0) in _vprintf()
318 info->putc(info, lz ? '0' : ' '); in _vprintf()
321 info->putc(info, ch); in _vprintf()
331 static void putc_normal(struct printf_info *info, char ch) in putc_normal() argument
338 struct printf_info info; in vprintf() local
340 info.putc = putc_normal; in vprintf()
341 return _vprintf(&info, fmt, va); in vprintf()
346 struct printf_info info; in printf() local
351 info.putc = putc_normal; in printf()
353 ret = _vprintf(&info, fmt, va); in printf()
360 static void putc_outstr(struct printf_info *info, char ch) in putc_outstr() argument
362 *info->outstr++ = ch; in putc_outstr()
367 struct printf_info info; in sprintf() local
372 info.outstr = buf; in sprintf()
373 info.putc = putc_outstr; in sprintf()
374 ret = _vprintf(&info, fmt, va); in sprintf()
376 *info.outstr = '\0'; in sprintf()
385 struct printf_info info; in vsnprintf() local
388 info.outstr = buf; in vsnprintf()
389 info.putc = putc_outstr; in vsnprintf()
390 ret = _vprintf(&info, fmt, va); in vsnprintf()
391 *info.outstr = '\0'; in vsnprintf()
400 struct printf_info info; in snprintf() local
405 info.outstr = buf; in snprintf()
406 info.putc = putc_outstr; in snprintf()
407 ret = _vprintf(&info, fmt, va); in snprintf()
409 *info.outstr = '\0'; in snprintf()