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
38using namespace std;
39
40namespace cp {
41
42Print::Print(std::ostream &stream, const std::string &format)
43 : stream(stream), format(format.c_str()), ptr(format.c_str()), cont(false)
44{
45 saved_flags = stream.flags();

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

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

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

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

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

208 end_number = false;
209 break;
210
211 case '0':
212 if (number == 0) {
213 fmt.fill_zero = true;
214 break;
215 }
216 case '1':
217 case '2':
218 case '3':
219 case '4':
220 case '5':
221 case '6':
222 case '7':
223 case '8':

--- 86 unchanged lines hidden ---