diff options
author | hobbs <hobbs> | 1999-08-19 02:59:08 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 1999-08-19 02:59:08 (GMT) |
commit | 92e37b2bd18d8a5451699c466c1664e53403da57 (patch) | |
tree | 4ca4faf0835ac78d536738f2e313561972b933c0 /generic/tclCmdAH.c | |
parent | 5e5c7d8418d3fbd50e237bc02c7c8d65618f5235 (diff) | |
download | tcl-92e37b2bd18d8a5451699c466c1664e53403da57.zip tcl-92e37b2bd18d8a5451699c466c1664e53403da57.tar.gz tcl-92e37b2bd18d8a5451699c466c1664e53403da57.tar.bz2 |
1999-08-18 Jeff Hobbs <hobbs@scriptics.com>
* doc/OpenFileChnl.3:
* doc/file.n:
* tests/cmdAH.test:
* tclIO.c:
* tclCmdAH.c: added "file channels ?pattern?" tcl command, with
associated Tcl_GetChannelNames and Tcl_GetChannelNamesEx public
C APIs (added to tcl.decls as well), with docs and tests.
* generic/tclCompile.c: add TCL_TOKEN_VARIABLE to the part types
that cause differed compilation for exprs, to correct the expr
double-evaluation problem for vars. Added test cases.
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r-- | generic/tclCmdAH.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 8dc8c54..14ac7f6 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -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: tclCmdAH.c,v 1.7 1999/07/01 23:21:06 redman Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.8 1999/08/19 02:59:08 hobbs Exp $ */ #include "tclInt.h" @@ -793,7 +793,8 @@ Tcl_FileObjCmd(dummy, interp, objc, objv) */ static char *fileOptions[] = { - "atime", "attributes", "copy", "delete", + "atime", "attributes", "channels", "copy", + "delete", "dirname", "executable", "exists", "extension", "isdirectory", "isfile", "join", "lstat", "mtime", "mkdir", "nativename", "owned", @@ -803,7 +804,8 @@ Tcl_FileObjCmd(dummy, interp, objc, objv) (char *) NULL }; enum options { - FILE_ATIME, FILE_ATTRIBUTES, FILE_COPY, FILE_DELETE, + FILE_ATIME, FILE_ATTRIBUTES, FILE_CHANNELS, FILE_COPY, + FILE_DELETE, FILE_DIRNAME, FILE_EXECUTABLE, FILE_EXISTS, FILE_EXTENSION, FILE_ISDIRECTORY, FILE_ISFILE, FILE_JOIN, FILE_LSTAT, FILE_MTIME, FILE_MKDIR, FILE_NATIVENAME, FILE_OWNED, @@ -838,6 +840,14 @@ Tcl_FileObjCmd(dummy, interp, objc, objv) case FILE_ATTRIBUTES: { return TclFileAttrsCmd(interp, objc, objv); } + case FILE_CHANNELS: { + if ((objc < 2) || (objc > 3)) { + Tcl_WrongNumArgs(interp, 2, objv, "?pattern?"); + return TCL_ERROR; + } + return Tcl_GetChannelNamesEx(interp, + ((objc == 2) ? NULL : Tcl_GetString(objv[2]))); + } case FILE_COPY: { int result; char **argv; |