summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclDecls.h8
-rw-r--r--generic/tclIntDecls.h8
-rw-r--r--generic/tclIntPlatDecls.h8
-rw-r--r--generic/tclParse.c31
-rw-r--r--generic/tclPlatDecls.h8
5 files changed, 40 insertions, 23 deletions
diff --git a/generic/tclDecls.h b/generic/tclDecls.h
index cb40ff3..5a2a70c 100644
--- a/generic/tclDecls.h
+++ b/generic/tclDecls.h
@@ -8,7 +8,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclDecls.h,v 1.9 1999/04/21 21:50:25 rjohnson Exp $
+ * RCS: @(#) $Id: tclDecls.h,v 1.10 1999/04/30 22:45:01 stanton Exp $
*/
#ifndef _TCLDECLS
@@ -1529,7 +1529,13 @@ typedef struct TclStubs {
int (*tcl_Stat) _ANSI_ARGS_((CONST char * path, struct stat * bufPtr)); /* 368 */
} TclStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclStubs *tclStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h
index 61edee0..c9529ed 100644
--- a/generic/tclIntDecls.h
+++ b/generic/tclIntDecls.h
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclIntDecls.h,v 1.8 1999/04/22 22:57:07 stanton Exp $
+ * RCS: @(#) $Id: tclIntDecls.h,v 1.9 1999/04/30 22:45:01 stanton Exp $
*/
#ifndef _TCLINTDECLS
@@ -608,7 +608,13 @@ typedef struct TclIntStubs {
void (*tclHideLiteral) _ANSI_ARGS_((Tcl_Interp * interp, struct CompileEnv * envPtr, int index)); /* 144 */
} TclIntStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclIntStubs *tclIntStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclIntPlatDecls.h b/generic/tclIntPlatDecls.h
index 628a03b..1a03db0 100644
--- a/generic/tclIntPlatDecls.h
+++ b/generic/tclIntPlatDecls.h
@@ -9,7 +9,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.5 1999/04/16 00:46:48 stanton Exp $
+ * RCS: @(#) $Id: tclIntPlatDecls.h,v 1.6 1999/04/30 22:45:02 stanton Exp $
*/
#ifndef _TCLINTPLATDECLS
@@ -268,7 +268,13 @@ typedef struct TclIntPlatStubs {
#endif /* MAC_TCL */
} TclIntPlatStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclIntPlatStubs *tclIntPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 0792e6e..647965a 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -14,7 +14,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclParse.c,v 1.5 1999/04/21 21:50:27 rjohnson Exp $
+ * RCS: @(#) $Id: tclParse.c,v 1.6 1999/04/30 22:45:02 stanton Exp $
*/
#include "tclInt.h"
@@ -483,10 +483,7 @@ Tcl_ParseCommand(interp, string, numBytes, nested, parsePtr)
error:
string[numBytes] = (char) savedChar;
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
if (parsePtr->commandStart == NULL) {
parsePtr->commandStart = string;
}
@@ -1743,10 +1740,7 @@ Tcl_ParseVarName(interp, string, numBytes, parsePtr, append)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -1985,10 +1979,7 @@ Tcl_ParseBraces(interp, string, numBytes, parsePtr, append, termPtr)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -2079,10 +2070,7 @@ Tcl_ParseQuotedString(interp, string, numBytes, parsePtr, append, termPtr)
return TCL_OK;
error:
- if (parsePtr->tokenPtr != parsePtr->staticTokens) {
- ckfree((char *) parsePtr->tokenPtr);
- parsePtr->tokenPtr = parsePtr->staticTokens;
- }
+ Tcl_FreeParse(parsePtr);
return TCL_ERROR;
}
@@ -2113,6 +2101,7 @@ CommandComplete(script, length)
{
Tcl_Parse parse;
char *p, *end;
+ int result;
p = script;
end = p + length;
@@ -2122,11 +2111,15 @@ CommandComplete(script, length)
if (*p == 0) {
break;
}
+ Tcl_FreeParse(&parse);
}
if (parse.incomplete) {
- return 0;
+ result = 0;
+ } else {
+ result = 1;
}
- return 1;
+ Tcl_FreeParse(&parse);
+ return result;
}
/*
diff --git a/generic/tclPlatDecls.h b/generic/tclPlatDecls.h
index 214020d..08f8b0f 100644
--- a/generic/tclPlatDecls.h
+++ b/generic/tclPlatDecls.h
@@ -6,7 +6,7 @@
* Copyright (c) 1998-1999 by Scriptics Corporation.
* All rights reserved.
*
- * RCS: @(#) $Id: tclPlatDecls.h,v 1.4 1999/04/16 00:46:51 stanton Exp $
+ * RCS: @(#) $Id: tclPlatDecls.h,v 1.5 1999/04/30 22:45:02 stanton Exp $
*/
#ifndef _TCLPLATDECLS
@@ -80,7 +80,13 @@ typedef struct TclPlatStubs {
#endif /* MAC_TCL */
} TclPlatStubs;
+#ifdef __cplusplus
+extern "C" {
+#endif
extern TclPlatStubs *tclPlatStubsPtr;
+#ifdef __cplusplus
+}
+#endif
#if defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS)