summaryrefslogtreecommitdiff
path: root/generic/Output.cpp
diff options
context:
space:
mode:
authorPixel <Pixel>2002-08-17 01:48:34 +0000
committerPixel <Pixel>2002-08-17 01:48:34 +0000
commit11bf45f50739afb923829b3cc32efb9c8c009613 (patch)
tree1a9a691cdd3a466d55259aa31fff1bfc0fcd8e7a /generic/Output.cpp
parent08ecf5aae1c7276bb1e78a288cba3a731604758e (diff)
Working with Baltisot now....
Diffstat (limited to 'generic/Output.cpp')
-rw-r--r--generic/Output.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/Output.cpp b/generic/Output.cpp
index 72d00cf..e136524 100644
--- a/generic/Output.cpp
+++ b/generic/Output.cpp
@@ -13,8 +13,8 @@
#define _(x) x
#endif
-Output::Output(String no, int trunc) throw (GeneralException) :
- Handle(no.strlen() ? open(no.to_charp(), O_WRONLY | O_CREAT | (trunc ? O_TRUNC : O_APPEND), 00666) : dup(1)),
+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), 00666) : dup(1)),
n(no) {
if (GetHandle() < 0) {
throw IOGeneral(String(_("Error opening file ")) + no + _(" for writing: ") + strerror(errno));