Deleted Added
sdiff udiff text old ( 7811:a8fc35183c10 ) new ( 9331:6630b3ffe7c0 )
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;

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

64{
65 fmt.clear();
66
67 size_t len;
68
69 while (*ptr) {
70 switch (*ptr) {
71 case '%':
72 if (ptr[1] != '%')
73 goto processing;
74
75 stream.put('%');
76 ptr += 2;
77 break;
78
79 case '\n':
80 stream << endl;
81 ++ptr;
82 break;

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

88
89 default:
90 len = strcspn(ptr, "%\n\r\0");
91 stream.write(ptr, len);
92 ptr += len;
93 break;
94 }
95 }
96
97 return;
98
99 processing:
100 bool done = false;
101 bool end_number = false;
102 bool have_precision = false;
103 int number = 0;
104
105 stream.fill(' ');
106 stream.flags((ios::fmtflags)0);
107

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

243 if (have_precision)
244 fmt.precision = number;
245 else
246 fmt.width = number;
247
248 end_number = false;
249 number = 0;
250 }
251 }
252
253 ++ptr;
254}
255
256void
257Print::end_args()
258{
259 size_t len;
260

--- 34 unchanged lines hidden ---