diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 15:45:26 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2016-06-29 15:45:26 (GMT) |
commit | c8212c36e91c536433c5a43b8a66ddb19c20d723 (patch) | |
tree | f1467c0c4be4b3e1bf9a056ee0b48dc1ac7fdef9 /generic/tclMain.c | |
parent | 964477ea367a07c99f36ff8dd83af5be6ad23a6e (diff) | |
download | tcl-c8212c36e91c536433c5a43b8a66ddb19c20d723.zip tcl-c8212c36e91c536433c5a43b8a66ddb19c20d723.tar.gz tcl-c8212c36e91c536433c5a43b8a66ddb19c20d723.tar.bz2 |
Remove Tcl_Main() function, since it's no longer being used: It has been a macro already for ages.
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r-- | generic/tclMain.c | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c index de7e29e..28f8fd8 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -112,7 +112,7 @@ typedef enum { PROMPT_CONTINUE /* Print prompt for command continuation */ } PromptType; -typedef struct InteractiveState { +typedef struct { Tcl_Channel input; /* The standard input channel from which lines * are read. */ int tty; /* Non-zero means standard input is a @@ -267,8 +267,10 @@ Tcl_SourceRCFile( c = Tcl_OpenFileChannel(NULL, fullName, "r", 0); if (c != NULL) { Tcl_Obj *fullNameObj = Tcl_NewStringObj(fullName, -1); + Tcl_Close(NULL, c); - if (Tcl_FSEvalFile(interp, fullNameObj) != TCL_OK) { + Tcl_IncrRefCount(fullNameObj); + if (Tcl_FSEvalFileEx(interp, fullNameObj, NULL) != TCL_OK) { chan = Tcl_GetStdChannel(TCL_STDERR); if (chan) { Tcl_WriteObj(chan, Tcl_GetObjResult(interp)); @@ -285,7 +287,7 @@ Tcl_SourceRCFile( /*---------------------------------------------------------------------- * - * Tcl_Main, Tcl_MainEx -- + * Tcl_MainEx -- * * Main program for tclsh and most other Tcl-based applications. * @@ -636,21 +638,6 @@ Tcl_MainEx( Tcl_Exit(exitCode); } - -#if (TCL_MAJOR_VERSION == 8) && !defined(UNICODE) -#undef Tcl_Main -extern DLLEXPORT void -Tcl_Main( - int argc, /* Number of arguments. */ - char **argv, /* Array of argument strings. */ - Tcl_AppInitProc *appInitProc) - /* Application-specific initialization - * function to call after most initialization - * but before starting to execute commands. */ -{ - Tcl_MainEx(argc, argv, appInitProc, Tcl_CreateInterp()); -} -#endif /* TCL_MAJOR_VERSION == 8 && !UNICODE */ #ifndef TCL_ASCII_MAIN |