summaryrefslogtreecommitdiffstats
path: root/tksao/fitsy++/channel.C
diff options
context:
space:
mode:
Diffstat (limited to 'tksao/fitsy++/channel.C')
-rw-r--r--tksao/fitsy++/channel.C21
1 files changed, 21 insertions, 0 deletions
diff --git a/tksao/fitsy++/channel.C b/tksao/fitsy++/channel.C
new file mode 100644
index 0000000..8d0b8da
--- /dev/null
+++ b/tksao/fitsy++/channel.C
@@ -0,0 +1,21 @@
+// Copyright (C) 1999-2016
+// Smithsonian Astrophysical Observatory, Cambridge, MA, USA
+// For conditions of distribution and use, see copyright notice in "copyright"
+
+#include <tcl.h>
+
+#include "channel.h"
+
+FitsChannel::FitsChannel(Tcl_Interp* interp, const char* ch, const char* ext)
+{
+ parse(ext);
+ if (!valid_)
+ return;
+
+ int tclMode;
+ stream_ = Tcl_GetChannel(interp, (char*)ch, &tclMode);
+
+ valid_ = stream_ ? 1 : 0;
+}
+
+