summaryrefslogtreecommitdiffstats
path: root/generic/tclMain.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclMain.c')
-rw-r--r--generic/tclMain.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/generic/tclMain.c b/generic/tclMain.c
index 19cf5d5..80eb200 100644
--- a/generic/tclMain.c
+++ b/generic/tclMain.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclMain.c,v 1.23 2004/03/19 18:33:52 kennykb Exp $
+ * RCS: @(#) $Id: tclMain.c,v 1.24 2004/03/29 15:47:31 dgp Exp $
*/
#include "tcl.h"
@@ -455,17 +455,17 @@ Tcl_Main(argc, argv, appInitProc)
break;
}
- /*
- * Add the newline removed by Tcl_GetsObj back to the string.
- */
-
- if (Tcl_IsShared(commandPtr)) {
- Tcl_DecrRefCount(commandPtr);
- commandPtr = Tcl_DuplicateObj(commandPtr);
- Tcl_IncrRefCount(commandPtr);
- }
- Tcl_AppendToObj(commandPtr, "\n", 1);
if (!TclObjCommandComplete(commandPtr)) {
+ /*
+ * Add the newline removed by Tcl_GetsObj back to the string.
+ */
+
+ if (Tcl_IsShared(commandPtr)) {
+ Tcl_DecrRefCount(commandPtr);
+ commandPtr = Tcl_DuplicateObj(commandPtr);
+ Tcl_IncrRefCount(commandPtr);
+ }
+ Tcl_AppendToObj(commandPtr, "\n", 1);
prompt = PROMPT_CONTINUE;
continue;
}
@@ -683,13 +683,13 @@ StdinProc(clientData, mask)
return;
}
- if (Tcl_IsShared(commandPtr)) {
- Tcl_DecrRefCount(commandPtr);
- commandPtr = Tcl_DuplicateObj(commandPtr);
- Tcl_IncrRefCount(commandPtr);
- }
- Tcl_AppendToObj(commandPtr, "\n", 1);
if (!TclObjCommandComplete(commandPtr)) {
+ if (Tcl_IsShared(commandPtr)) {
+ Tcl_DecrRefCount(commandPtr);
+ commandPtr = Tcl_DuplicateObj(commandPtr);
+ Tcl_IncrRefCount(commandPtr);
+ }
+ Tcl_AppendToObj(commandPtr, "\n", 1);
isPtr->prompt = PROMPT_CONTINUE;
goto prompt;
}