Deleted Added
sdiff udiff text old ( 2665:a124942bacb8 ) new ( 4840:ad2beb0f9fd8 )
full compact
1/*
2 * Copyright (c) 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;

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

82
83string
84OutputDirectory::resolve(const string &name)
85{
86 return (name[0] != '/') ? dir + name : name;
87}
88
89ostream *
90OutputDirectory::create(const string &name)
91{
92 if (name == "cerr" || name == "stderr")
93 return &cerr;
94
95 if (name == "cout" || name == "stdout")
96 return &cout;
97
98 ofstream *file = new ofstream(resolve(name).c_str(), ios::trunc);
99 if (!file->is_open())
100 panic("Cannot open file %s", name);
101
102 return file;
103}
104
105ostream *
106OutputDirectory::find(const string &name)

--- 25 unchanged lines hidden ---