text.cc (8514:57c96df312a1) | text.cc (8634:8390f2d80227) |
---|---|
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; --- 660 unchanged lines hidden (view full) --- 669 670Output * 671initText(const string &filename, bool desc) 672{ 673 static Text text; 674 static bool connected = false; 675 676 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; --- 660 unchanged lines hidden (view full) --- 669 670Output * 671initText(const string &filename, bool desc) 672{ 673 static Text text; 674 static bool connected = false; 675 676 if (!connected) { |
677 text.open(*simout.find(filename)); | 677 ostream *os = simout.find(filename); 678 if (!os) 679 os = simout.create(filename); 680 681 text.open(*os); |
678 text.descriptions = desc; 679 connected = true; 680 } 681 682 return &text; 683} 684 685} // namespace Stats | 682 text.descriptions = desc; 683 connected = true; 684 } 685 686 return &text; 687} 688 689} // namespace Stats |