summaryrefslogtreecommitdiff
path: root/lib/OutPipe.cc
diff options
context:
space:
mode:
authorpixel <pixel>2004-11-27 21:46:02 +0000
committerpixel <pixel>2004-11-27 21:46:02 +0000
commitae2779e504ca5ae11a87e047b4536a5f428cce4d (patch)
tree19604ce1873e9cc98be9b840b894cb7eae341532 /lib/OutPipe.cc
parent583964f9f8e954eb57b31663065c5b9e833d045e (diff)
Large dos2unix commit...
Diffstat (limited to 'lib/OutPipe.cc')
-rw-r--r--lib/OutPipe.cc82
1 files changed, 41 insertions, 41 deletions
diff --git a/lib/OutPipe.cc b/lib/OutPipe.cc
index 943bef0..c8d979c 100644
--- a/lib/OutPipe.cc
+++ b/lib/OutPipe.cc
@@ -1,41 +1,41 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include "OutPipe.h"
-#include "Input.h"
-#include "gettext.h"
-
-OutPipe::OutPipe() : Handle(pipe(p, 1)), hooked(0) { }
-
-OutPipe::~OutPipe() {
- if (hooked) {
- ::close(0);
- dup(Stdin.GetHandle());
- }
-}
-
-OutPipe::OutPipe(const OutPipe & o) : Handle(o), hooked(o.hooked) {
- p[0] = dup(o.p[0]);
- p[1] = GetHandle();
-}
-
-void OutPipe::Hook() {
- if (!hooked) {
- hooked = 1;
- ::close(0);
- dup(p[0]);
- ::close(p[0]);
- }
-}
-
-bool OutPipe::CanWrite() {
- return true;
-}
-
-bool OutPipe::CanRead() {
- return false;
-}
-
-String OutPipe::GetName() {
- return (String(_("Output pipe to stdin (")) + (hooked ? "" : _("not ")) + _("hooked)"));
-}
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+#include "OutPipe.h"
+#include "Input.h"
+#include "gettext.h"
+
+OutPipe::OutPipe() : Handle(pipe(p, 1)), hooked(0) { }
+
+OutPipe::~OutPipe() {
+ if (hooked) {
+ ::close(0);
+ dup(Stdin.GetHandle());
+ }
+}
+
+OutPipe::OutPipe(const OutPipe & o) : Handle(o), hooked(o.hooked) {
+ p[0] = dup(o.p[0]);
+ p[1] = GetHandle();
+}
+
+void OutPipe::Hook() {
+ if (!hooked) {
+ hooked = 1;
+ ::close(0);
+ dup(p[0]);
+ ::close(p[0]);
+ }
+}
+
+bool OutPipe::CanWrite() {
+ return true;
+}
+
+bool OutPipe::CanRead() {
+ return false;
+}
+
+String OutPipe::GetName() {
+ return (String(_("Output pipe to stdin (")) + (hooked ? "" : _("not ")) + _("hooked)"));
+}