rm support for tcl <8.4

This commit is contained in:
James Cherry 2020-12-26 09:17:02 -08:00
parent 7cf85f7771
commit e55b66f60b
3 changed files with 6 additions and 167 deletions

View File

@ -67,7 +67,7 @@ work, but these are the versions used for development.
cmake 3.10.2 3.10.2 3.16.2
clang 9.1.0 11.0.0
gcc 3.3.2 7.3.0
tcl 8.2 8.6 8.6.6
tcl 8.4 8.6 8.6.6
swig 1.3.28 3.0.12 4.0.1
bison 1.35 3.0.4 3.5
flex 2.5.4 2.6.4 2.5.35

View File

@ -22,9 +22,12 @@
namespace sta {
// Encapsulate the Tcl stdout and stderr channels to print to the
// report object so that the output from Tcl puts and errors can be
// logged and redirected.
//
// Output streams that talk to TCL channels.
// This directs all output on the Report object to tcl stdout and stderr
// channels.
// This directs all output on the Report object to the Tcl stdout channel.
// Tcl output channels are encapsulated to print to the Report object
// that supports redirection and logging as well as printing to the
// underlying channel.

View File

@ -31,12 +31,6 @@ using ::Tcl_GetChannelType;
extern "C" {
// Tcl8.4 adds const's to Tcl_ChannelType but earlier versions
// don't have them.
#ifndef CONST84
#define CONST84
#endif
static int
encapOutputProc(ClientData instanceData,
CONST84 char *buf,
@ -79,7 +73,6 @@ static int
encapBlockModeProc(ClientData instanceData, int mode);
} // extern "C"
#ifdef TCL_CHANNEL_VERSION_5
Tcl_ChannelType tcl_encap_type_stdout = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_4,
@ -120,160 +113,6 @@ Tcl_ChannelType tcl_encap_type_stderr = {
nullptr // truncateProc
};
#else
#ifdef TCL_CHANNEL_VERSION_4
// Tcl 8.4.12
Tcl_ChannelType tcl_encap_type_stdout = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_4,
encapCloseProc,
encapInputProc,
encapOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr, // handlerProc
nullptr, // wideSeekProc
nullptr // threadActionProc
};
Tcl_ChannelType tcl_encap_type_stderr = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_4,
encapCloseProc,
encapInputProc,
encapErrorOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr, // handlerProc
nullptr, // wideSeekProc
nullptr // threadActionProc
};
#else
#ifdef TCL_CHANNEL_VERSION_3
// Tcl 8.4
Tcl_ChannelType tcl_encap_type_stdout = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_3,
encapCloseProc,
encapInputProc,
encapOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr, // handlerProc
nullptr // wideSeekProc
};
Tcl_ChannelType tcl_encap_type_stderr = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_3,
encapCloseProc,
encapInputProc,
encapErrorOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr, // handlerProc
nullptr // wideSeekProc
};
#else
#ifdef TCL_CHANNEL_VERSION_2
// Tcl 8.3.2
Tcl_ChannelType tcl_encap_type_stdout = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_2,
encapCloseProc,
encapInputProc,
encapOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr // handlerProc
};
Tcl_ChannelType tcl_encap_type_stderr = {
const_cast<char *>("file"),
TCL_CHANNEL_VERSION_2,
encapCloseProc,
encapInputProc,
encapErrorOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr, // close2Proc
encapBlockModeProc,
nullptr, // flushProc
nullptr // handlerProc
};
#else
// Tcl 8.2
Tcl_ChannelType tcl_encap_type_stdout = {
const_cast<char *>("file"),
encapBlockModeProc,
encapCloseProc,
encapInputProc,
encapOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr // close2Proc
};
Tcl_ChannelType tcl_encap_type_stderr = {
const_cast<char *>("file"),
encapBlockModeProc,
encapCloseProc,
encapInputProc,
encapErrorOutputProc,
encapSeekProc,
encapSetOptionProc,
encapGetOptionProc,
encapWatchProc,
encapGetHandleProc,
nullptr // close2Proc
};
#endif
#endif
#endif
#endif
////////////////////////////////////////////////////////////////
ReportTcl::ReportTcl() :
@ -293,9 +132,6 @@ ReportTcl::~ReportTcl()
Tcl_UnstackChannel(interp_, tcl_stderr_);
}
// Encapsulate the Tcl stdout and stderr channels to print to the
// report object so that the output from Tcl puts and errors can be
// logged and redirected.
void
ReportTcl::setTclInterp(Tcl_Interp *interp)
{