Deleted Added
sdiff udiff text old ( 4046:ef34b290091e ) new ( 4429:74351f86f49a )
full compact
1/*
2 * Copyright (c) 2004-2005 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;

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

27 *
28 * Authors: Nathan Binkert
29 * Ali Saidi
30 */
31
32#include <sys/types.h>
33#include <algorithm>
34
35#include "base/trace.hh"
36#include "arch/arguments.hh"
37
38using namespace std;
39
40
41void
42Printk(TheISA::Arguments args)
43{
44 std::ostream &out = Trace::output();
45 char *p = (char *)args++;
46
47 ios::fmtflags saved_flags = out.flags();
48 char old_fill = out.fill();
49 int old_precision = out.precision();
50
51 while (*p) {
52 switch (*p) {
53 case '%': {
54 bool more = true;
55 bool islong = false;
56 bool leftjustify = false;
57 bool format = false;
58 bool zero = false;

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

253 default: {
254 size_t len = strcspn(p, "%\n\r\0");
255 out.write(p, len);
256 p += len;
257 }
258 }
259 }
260
261 out.flags(saved_flags);
262 out.fill(old_fill);
263 out.precision(old_precision);
264}
265