summaryrefslogtreecommitdiffstats
path: root/mac/tclMacBOAMain.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2001-12-28 23:36:31 (GMT)
committerdgp <dgp@users.sourceforge.net>2001-12-28 23:36:31 (GMT)
commitd03180362037487dc4c3b1db39fdfef913c6e45a (patch)
tree3e6e8fb2ceb72322d141f778af9e66bd22b95fb0 /mac/tclMacBOAMain.c
parentd279f3a31ab8738baedcb41295db291eb30ab96d (diff)
downloadtcl-d03180362037487dc4c3b1db39fdfef913c6e45a.zip
tcl-d03180362037487dc4c3b1db39fdfef913c6e45a.tar.gz
tcl-d03180362037487dc4c3b1db39fdfef913c6e45a.tar.bz2
* generic/tclCkalloc.c (MemoryCmd, TclFinalizeMemorySubsystem):
Added the [memory onexit] command, intended to replace [checkmem]. * doc/DumpActiveMemory.3: * doc/memory.n: Updated documentation for [memory] and related matters. [Bug 487677] * mac/tclMacBOAMain.c (Tcl_Main, CheckmemCmd): Removed all the machinery for the [checkmem] command that is completely duplicated by code in generic/tclCkalloc.c. * generic/tclBinary.c: * generic/tclListObj.c: * generic/tclObj.c: * generic/tclStringObj.c: Removed references to [checkmem] in comments, referencing [memory active] instead, since it is documented.
Diffstat (limited to 'mac/tclMacBOAMain.c')
-rw-r--r--mac/tclMacBOAMain.c59
1 files changed, 1 insertions, 58 deletions
diff --git a/mac/tclMacBOAMain.c b/mac/tclMacBOAMain.c
index d863e9c..ff1a943 100644
--- a/mac/tclMacBOAMain.c
+++ b/mac/tclMacBOAMain.c
@@ -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: tclMacBOAMain.c,v 1.3 1999/04/16 00:47:19 stanton Exp $
+ * RCS: @(#) $Id: tclMacBOAMain.c,v 1.4 2001/12/28 23:36:31 dgp Exp $
*/
#include "tcl.h"
@@ -49,22 +49,10 @@ extern char * strcpy _ANSI_ARGS_((char *dst, CONST char *src));
static Tcl_Interp *interp; /* Interpreter for application. */
-#ifdef TCL_MEM_DEBUG
-static char dumpFile[100]; /* Records where to dump memory allocation
- * information. */
-static int quitFlag = 0; /* 1 means "checkmem" command was called,
- * so the application should quit and dump
- * memory allocation information. */
-#endif
-
/*
* Forward references for procedures defined later in this file:
*/
-#ifdef TCL_MEM_DEBUG
-static int CheckmemCmd _ANSI_ARGS_((ClientData clientData,
- Tcl_Interp *interp, int argc, char *argv[]));
-#endif
void TclMacDoNotification(char *mssg);
void TclMacNotificationResponse(NMRecPtr nmRec);
int Tcl_MacBGNotifyObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *const *objv);
@@ -108,11 +96,7 @@ Tcl_Main(argc, argv, appInitProc)
Tcl_FindExecutable(argv[0]);
interp = Tcl_CreateInterp();
-#ifdef TCL_MEM_DEBUG
Tcl_InitMemory(interp);
- Tcl_CreateCommand(interp, "checkmem", CheckmemCmd, (ClientData) 0,
- (Tcl_CmdDeleteProc *) NULL);
-#endif
/*
* Make command-line arguments available in the Tcl variables "argc"
@@ -318,44 +302,3 @@ Tcl_MacBGNotifyObjCmd(clientData, interp, objc, objv)
}
-
-/*
- *----------------------------------------------------------------------
- *
- * CheckmemCmd --
- *
- * This is the command procedure for the "checkmem" command, which
- * causes the application to exit after printing information about
- * memory usage to the file passed to this command as its first
- * argument.
- *
- * Results:
- * Returns a standard Tcl completion code.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-#ifdef TCL_MEM_DEBUG
-
- /* ARGSUSED */
-static int
-CheckmemCmd(clientData, interp, argc, argv)
- ClientData clientData; /* Not used. */
- Tcl_Interp *interp; /* Interpreter for evaluation. */
- int argc; /* Number of arguments. */
- char *argv[]; /* String values of arguments. */
-{
- extern char *tclMemDumpFileName;
- if (argc != 2) {
- Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
- " fileName\"", (char *) NULL);
- return TCL_ERROR;
- }
- strcpy(dumpFile, argv[1]);
- tclMemDumpFileName = dumpFile;
- quitFlag = 1;
- return TCL_OK;
-}
-#endif