text.cc (10386:c81407818741) | text.cc (11359:b0b976a1ceda) |
---|---|
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; --- 726 unchanged lines hidden (view full) --- 735 736Output * 737initText(const string &filename, bool desc) 738{ 739 static Text text; 740 static bool connected = false; 741 742 if (!connected) { | 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; --- 726 unchanged lines hidden (view full) --- 735 736Output * 737initText(const string &filename, bool desc) 738{ 739 static Text text; 740 static bool connected = false; 741 742 if (!connected) { |
743 ostream *os = simout.find(filename); 744 if (!os) 745 os = simout.create(filename); 746 747 text.open(*os); | 743 text.open(*simout.findOrCreate(filename)->stream()); |
748 text.descriptions = desc; 749 connected = true; 750 } 751 752 return &text; 753} 754 755} // namespace Stats | 744 text.descriptions = desc; 745 connected = true; 746 } 747 748 return &text; 749} 750 751} // namespace Stats |