diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2010-12-09 15:09:07 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2010-12-09 15:09:07 (GMT) |
commit | ee6985ab9eed245164bf1078496d5b7efbabdd9c (patch) | |
tree | ce38d69f9ab51ef0a83d6e83b49177e042a74a31 /generic/tclBasic.c | |
parent | 04d3371ea6033290def691a38224ba78356f0a9a (diff) | |
download | tcl-ee6985ab9eed245164bf1078496d5b7efbabdd9c.zip tcl-ee6985ab9eed245164bf1078496d5b7efbabdd9c.tar.gz tcl-ee6985ab9eed245164bf1078496d5b7efbabdd9c.tar.bz2 |
* generic/tclCmdAH.c (TclInitFileCmd, TclMakeFileCommandSafe, ...):
Break up [file] into an ensemble. Note that the ensemble is safe in
itself, but the majority of its subcommands are not.
* generic/tclFCmd.c (FileCopyRename,TclFileDeleteCmd,TclFileAttrsCmd)
(TclFileMakeDirsCmd): Adjust these subcommand implementations to work
inside an ensemble.
(TclFileLinkCmd, TclFileReadLinkCmd, TclFileTemporaryCmd): Move these
subcommand implementations from tclCmdAH.c, where they didn't really
belong.
* generic/tclIOCmd.c (TclChannelNamesCmd): Move to more appropriate
source file.
* generic/tclEnsemble.c (TclMakeEnsemble): Start of code to make
partially-safe ensembles. Currently does not function as expected due
to various shortcomings in how safe interpreters are constructed.
* tests/cmdAH.test, tests/fCmd.test, tests/interp.test: Test updates
to take into account systematization of error messages.
Diffstat (limited to 'generic/tclBasic.c')
-rw-r--r-- | generic/tclBasic.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 22daf78..d863347 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -16,7 +16,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.471 2010/12/01 09:58:52 nijtmans Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.472 2010/12/09 15:09:07 dkf Exp $ */ #include "tclInt.h" @@ -276,7 +276,6 @@ static const CmdInfo builtInCmds[] = { {"fblocked", Tcl_FblockedObjCmd, NULL, NULL, 1}, {"fconfigure", Tcl_FconfigureObjCmd, NULL, NULL, 0}, {"fcopy", Tcl_FcopyObjCmd, NULL, NULL, 1}, - {"file", Tcl_FileObjCmd, NULL, NULL, 0}, {"fileevent", Tcl_FileEventObjCmd, NULL, NULL, 1}, {"flush", Tcl_FlushObjCmd, NULL, NULL, 1}, {"gets", Tcl_GetsObjCmd, NULL, NULL, 1}, @@ -783,15 +782,17 @@ Tcl_CreateInterp(void) } /* - * Create the "array", "binary", "chan", "dict", "info" and "string" - * ensembles. Note that all these commands (and their subcommands that are - * not present in the global namespace) are wholly safe. + * Create the "array", "binary", "chan", "dict", "file", "info" and + * "string" ensembles. Note that all these commands (and their subcommands + * that are not present in the global namespace) are wholly safe *except* + * for "file". */ TclInitArrayCmd(interp); TclInitBinaryCmd(interp); TclInitChanCmd(interp); TclInitDictCmd(interp); + TclInitFileCmd(interp); TclInitInfoCmd(interp); TclInitStringCmd(interp); TclInitPrefixCmd(interp); @@ -1007,6 +1008,7 @@ TclHideUnsafeCommands( Tcl_HideCommand(interp, cmdInfoPtr->name, cmdInfoPtr->name); } } + TclMakeFileCommandSafe(interp); /* Ugh! */ return TCL_OK; } |