diff options
author | Pixel <Pixel> | 2002-09-27 12:17:57 +0000 |
---|---|---|
committer | Pixel <Pixel> | 2002-09-27 12:17:57 +0000 |
commit | bfa5de7eccf4604ff8217f619e9685a09e80d545 (patch) | |
tree | a5be5de750ac611145f459a09bda902c3dbc1a70 /generic/Output.cpp | |
parent | 60c1003845035ad4cd0e9ea50862bad7626faf0e (diff) |
The week-without-the-network changes
Diffstat (limited to 'generic/Output.cpp')
-rw-r--r-- | generic/Output.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/generic/Output.cpp b/generic/Output.cpp index 55ab158..b072236 100644 --- a/generic/Output.cpp +++ b/generic/Output.cpp @@ -14,7 +14,7 @@ #endif Output::Output(String no, int create, int trunc) throw (GeneralException) : - Handle(no.strlen() ? open(no.to_charp(), O_WRONLY | (O_CREAT * (create ? 1 : 0)) | (trunc ? O_TRUNC : O_APPEND) + Handle(no.strlen() ? open(no.to_charp(), O_WRONLY | (O_CREAT * (create ? 1 : 0)) | (O_TRUNC * (trunc ? 1 : 0)) #if defined __linux__ || defined __CYGWIN32__ , 00666 #endif @@ -37,15 +37,15 @@ Output::Output(String no, int create, int trunc) throw (GeneralException) : Output::Output(const Output & o) : Handle(o), n(o.n) { } -bool Output::CanWrite() { +bool Output::CanWrite() const { return 1; } -bool Output::CanRead() { +bool Output::CanRead() const { return 0; } -bool Output::CanSeek() { +bool Output::CanSeek() const { struct stat s; fstat(GetHandle(), &s); @@ -65,35 +65,35 @@ off_t Output::seek(off_t offset, int whence) throw (GeneralException) { return itell; } -String Output::GetName() { +String Output::GetName() const { return n; } Stdout_t::Stdout_t() {} -bool Stdout_t::CanSeek() { +bool Stdout_t::CanSeek() const { return 0; } -String Stdout_t::GetName() { +String Stdout_t::GetName() const { return "Stdout"; } Stderr_t::Stderr_t() : Handle(dup(2)) {} -bool Stderr_t::CanWrite() { +bool Stderr_t::CanWrite() const { return 1; } -bool Stderr_t::CanRead() { +bool Stderr_t::CanRead() const { return 0; } -bool Stderr_t::CanSeek() { +bool Stderr_t::CanSeek() const { return 0; } -String Stderr_t::GetName() { +String Stderr_t::GetName() const { return "Stderr"; } |