diff options
Diffstat (limited to 'fitsy/channel.C')
-rw-r--r-- | fitsy/channel.C | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/fitsy/channel.C b/fitsy/channel.C new file mode 100644 index 0000000..7fb106f --- /dev/null +++ b/fitsy/channel.C @@ -0,0 +1,21 @@ +// Copyright (C) 1999-2018 +// 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; +} + + |