summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2006-03-14 19:34:25 (GMT)
committervincentdarley <vincentdarley>2006-03-14 19:34:25 (GMT)
commit54b14791b5842fe7e3c0ad6a77e2e6bd10237627 (patch)
tree174d43369770a1c8db6a61a7f76f4fe572109cfd /generic
parent02d304b56fb79258a992e9f47e325445f2e75d40 (diff)
downloadtcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.zip
tcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.tar.gz
tcl-54b14791b5842fe7e3c0ad6a77e2e6bd10237627.tar.bz2
90% fix of file writable issues on Windows
Diffstat (limited to 'generic')
-rw-r--r--generic/tclTest.c65
1 files changed, 1 insertions, 64 deletions
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 74d430a..1249eb9 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.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: tclTest.c,v 1.101 2006/02/08 21:41:27 dgp Exp $
+ * RCS: @(#) $Id: tclTest.c,v 1.102 2006/03/14 19:34:27 vincentdarley Exp $
*/
#define TCL_TEST
@@ -217,8 +217,6 @@ static int TestcmdtokenCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
static int TestcmdtraceCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
-static int TestchmodCmd(ClientData dummy,
- Tcl_Interp *interp, int argc, CONST char **argv);
static int TestcreatecommandCmd(ClientData dummy,
Tcl_Interp *interp, int argc, CONST char **argv);
static int TestdcallCmd(ClientData dummy,
@@ -585,8 +583,6 @@ Tcltest_Init(
(ClientData) 0, NULL);
Tcl_CreateCommand(interp, "testchannelevent", TestChannelEventCmd,
(ClientData) 0, NULL);
- Tcl_CreateCommand(interp, "testchmod", TestchmodCmd,
- (ClientData) 0, NULL);
Tcl_CreateCommand(interp, "testcmdtoken", TestcmdtokenCmd, (ClientData) 0,
NULL);
Tcl_CreateCommand(interp, "testcmdinfo", TestcmdinfoCmd, (ClientData) 0,
@@ -4406,65 +4402,6 @@ TestpanicCmd(dummy, interp, argc, argv)
return TCL_OK;
}
-
-/*
- *---------------------------------------------------------------------------
- *
- * TestchmodCmd --
- *
- * Implements the "testchmod" cmd. Used when testing "file" command.
- * The only attribute used by the Windows platform is the user write
- * flag; if this is not set, the file is made read-only. Otehrwise, the
- * file is made read-write.
- *
- * Results:
- * A standard Tcl result.
- *
- * Side effects:
- * Changes permissions of specified files.
- *
- *---------------------------------------------------------------------------
- */
-
-static int
-TestchmodCmd(dummy, interp, argc, argv)
- ClientData dummy; /* Not used. */
- Tcl_Interp *interp; /* Current interpreter. */
- int argc; /* Number of arguments. */
- CONST char **argv; /* Argument strings. */
-{
- int i, mode;
- char *rest;
-
- if (argc < 2) {
- usage:
- Tcl_AppendResult(interp, "wrong # args: should be \"", argv[0],
- " mode file ?file ...?", NULL);
- return TCL_ERROR;
- }
-
- mode = (int) strtol(argv[1], &rest, 8);
- if ((rest == argv[1]) || (*rest != '\0')) {
- goto usage;
- }
-
- for (i = 2; i < argc; i++) {
- Tcl_DString buffer;
- CONST char *translated;
-
- translated = Tcl_TranslateFileName(interp, argv[i], &buffer);
- if (translated == NULL) {
- return TCL_ERROR;
- }
- if (chmod(translated, (unsigned) mode) != 0) {
- Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp),
- NULL);
- return TCL_ERROR;
- }
- Tcl_DStringFree(&buffer);
- }
- return TCL_OK;
-}
static int
TestfileCmd(dummy, interp, argc, argv)