Lines Matching defs:format

1 /* Internal header for parsing printf format strings.
33 /* Information parsed from the format spec. */
36 /* Pointers into the format string for the end of this format
46 /* Number of arguments consumed by this format specifier. */
95 find_spec (const UCHAR_T *format)
97 find_spec (const UCHAR_T *format, mbstate_t *ps)
101 return (const UCHAR_T *) __wcschrnul ((const CHAR_T *) format, L'%');
103 while (*format != L_('\0') && *format != L_('%'))
109 if (! isascii (*format) && (len = __mbrlen (format, MB_CUR_MAX, ps)) > 0)
110 format += len;
112 ++format;
114 return format;
131 parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec,
134 parse_one_spec (const UCHAR_T *format, size_t posn, struct printf_spec *spec,
142 ++format;
156 if (ISDIGIT (*format))
158 const UCHAR_T *begin = format;
160 n = read_int (&format);
162 if (n > 0 && *format == L_('$'))
165 ++format; /* Skip the '$'. */
172 format = begin;
178 switch (*format)
216 while (*++format);
224 if (*format == L_('*'))
228 const UCHAR_T *begin = ++format;
230 if (ISDIGIT (*format))
233 n = read_int (&format);
235 if (n > 0 && *format == L_('$'))
239 ++format; /* Skip '$'. */
248 format = begin; /* Step back and reread. */
251 else if (ISDIGIT (*format))
253 spec->info.width = read_int (&format);
259 if (*format == L_('.'))
261 ++format;
262 if (*format == L_('*'))
265 const UCHAR_T *begin = ++format;
267 if (ISDIGIT (*format))
269 n = read_int (&format);
271 if (n > 0 && *format == L_('$'))
275 ++format;
284 format = begin;
287 else if (ISDIGIT (*format))
288 spec->info.prec = read_int (&format);
300 switch (*format++)
304 if (*format != L_('h'))
308 ++format;
315 if (*format != L_('l'))
317 ++format;
351 --format;
355 /* Get the format specification. */
356 spec->info.spec = (wchar_t) *format++;
360 /* We don't try to get the types for all arguments if the format
441 spec->end_of_fmt = spec->next_fmt = format - 1;
444 /* Find the next format spec. */
445 spec->end_of_fmt = format;
447 spec->next_fmt = find_spec (format);
449 spec->next_fmt = find_spec (format, ps);