Lines Matching full:specs
203 explicit printf_width_handler(format_specs<Char>& specs) : specs_(specs) {}
242 auto s = this->specs;
262 format_specs<Char> fmt_specs = this->specs;
287 write_null_pointer(this->specs.type != presentation_type::pointer);
295 write_null_pointer(this->specs.type != presentation_type::pointer);
316 void parse_flags(format_specs<Char>& specs, const Char*& it, const Char* end) {
320 specs.align = align::left;
323 specs.sign = sign::plus;
326 specs.fill[0] = '0';
329 if (specs.sign != sign::plus) specs.sign = sign::space;
332 specs.alt = true;
341 auto parse_header(const Char*& it, const Char* end, format_specs<Char>& specs,
353 if (c == '0') specs.fill[0] = '0';
358 specs.width = value;
363 parse_flags(specs, it, end);
367 specs.width = parse_nonnegative_int(it, end, -1);
368 if (specs.width == -1) throw_format_error("number is too big");
371 specs.width = static_cast<int>(visit_format_arg(
372 detail::printf_width_handler<Char>(specs), get_arg(-1)));
452 auto specs = format_specs<Char>();
453 specs.align = align::right;
456 int arg_index = parse_header(it, end, specs, get_arg);
464 specs.precision = parse_nonnegative_int(it, end, 0);
467 specs.precision = static_cast<int>(
470 specs.precision = 0;
477 if (specs.precision >= 0 && arg.is_integral()) {
479 specs.fill[0] = ' ';
481 if (specs.precision >= 0 && arg.type() == type::cstring_type) {
483 auto str_end = str + specs.precision;
486 str, to_unsigned(nul != str_end ? nul - str : specs.precision));
489 if (specs.alt && visit_format_arg(is_zero_int(), arg)) specs.alt = false;
490 if (specs.fill[0] == '0') {
491 if (arg.is_arithmetic() && specs.align != align::left)
492 specs.align = align::numeric;
494 specs.fill[0] = ' '; // Ignore '0' flag for non-numeric types or if '-'
553 specs.type = parse_printf_presentation_type(type, arg.type());
554 if (specs.type == presentation_type::none)
560 visit_format_arg(printf_arg_formatter<Char>(out, specs, context), arg);