Deleted Added
sdiff udiff text old ( 11793:ef606668d247 ) new ( 12392:e0dbdf30a2a5 )
full compact
1/*
2 * Copyright (c) 2002-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;

--- 21 unchanged lines hidden (view full) ---

30
31#include "base/cprintf.hh"
32
33#include <cassert>
34#include <iomanip>
35#include <iostream>
36#include <sstream>
37
38#include "base/compiler.hh"
39
40using namespace std;
41
42namespace cp {
43
44Print::Print(std::ostream &stream, const std::string &format)
45 : stream(stream), format(format.c_str()), ptr(format.c_str()), cont(false)
46{
47 saved_flags = stream.flags();

--- 87 unchanged lines hidden (view full) ---

135 fmt.format = Format::integer;
136 fmt.base = Format::hex;
137 fmt.alternate_form = true;
138 done = true;
139 break;
140
141 case 'X':
142 fmt.uppercase = true;
143 M5_FALLTHROUGH;
144 case 'x':
145 fmt.base = Format::hex;
146 fmt.format = Format::integer;
147 done = true;
148 break;
149
150 case 'o':
151 fmt.base = Format::oct;

--- 5 unchanged lines hidden (view full) ---

157 case 'i':
158 case 'u':
159 fmt.format = Format::integer;
160 done = true;
161 break;
162
163 case 'G':
164 fmt.uppercase = true;
165 M5_FALLTHROUGH;
166 case 'g':
167 fmt.format = Format::floating;
168 fmt.float_format = Format::best;
169 done = true;
170 break;
171
172 case 'E':
173 fmt.uppercase = true;
174 M5_FALLTHROUGH;
175 case 'e':
176 fmt.format = Format::floating;
177 fmt.float_format = Format::scientific;
178 done = true;
179 break;
180
181 case 'f':
182 fmt.format = Format::floating;

--- 30 unchanged lines hidden (view full) ---

213 end_number = false;
214 break;
215
216 case '0':
217 if (number == 0) {
218 fmt.fill_zero = true;
219 break;
220 }
221 M5_FALLTHROUGH;
222 case '1':
223 case '2':
224 case '3':
225 case '4':
226 case '5':
227 case '6':
228 case '7':
229 case '8':

--- 86 unchanged lines hidden ---