42 Print::Print(std::ostream &stream,
const std::string &
format)
43 : stream(stream), format(format.c_str()), ptr(format.c_str()), cont(false)
51 : stream(stream), format(format), ptr(format), cont(false)
91 len = strcspn(
ptr,
"%\n\r\0");
103 bool end_number =
false;
104 bool have_precision =
false;
108 stream.flags((ios::fmtflags)0);
112 if (*
ptr >=
'0' && *
ptr <=
'9') {
115 }
else if (number > 0)
183 stream <<
"we don't do %n!!!\n";
206 have_precision =
true;
225 number = number * 10 + (*
ptr -
'0');
236 assert(
false &&
"we shouldn't get here");
297 len = strcspn(
ptr,
"%\n\r\0");
Print(std::ostream &stream, const std::string &format)
Bitfield< 31, 29 > format
std::ios::fmtflags saved_flags