summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-29 15:45:26 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2016-06-29 15:45:26 (GMT)
commit9e0c4021277674c3182c3082c38a5915d872ae0a (patch)
treef1467c0c4be4b3e1bf9a056ee0b48dc1ac7fdef9 /generic/tclMain.c
parentbbccbfba7b9080ce0a137da9100b3ee550cdea41 (diff)
downloadtcl-9e0c4021277674c3182c3082c38a5915d872ae0a.zip
tcl-9e0c4021277674c3182c3082c38a5915d872ae0a.tar.gz
tcl-9e0c4021277674c3182c3082c38a5915d872ae0a.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.c23
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