diff options
Diffstat (limited to 'generic/tclFCmd.c')
-rw-r--r-- | generic/tclFCmd.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/generic/tclFCmd.c b/generic/tclFCmd.c index adf60d9..036a82c 100644 --- a/generic/tclFCmd.c +++ b/generic/tclFCmd.c @@ -10,7 +10,6 @@ * this file, and for a DISCLAIMER OF ALL WARRANTIES. */ -#include <sys/stat.h> #include "tclInt.h" #include "tclFileSystem.h" @@ -121,7 +120,7 @@ FileCopyRename( } i++; if ((objc - i) < 2) { - Tcl_WrongNumArgs(interp, 1, objv, + Tcl_WrongNumArgs(interp, 1, objv, "?-option value ...? source ?source ...? target"); return TCL_ERROR; } @@ -832,8 +831,8 @@ FileForceOption( if (TclGetString(objv[i])[0] != '-') { break; } - if (Tcl_GetIndexFromObj(interp, objv[i], options, "option", TCL_EXACT, - &idx) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[i], options, + sizeof(char *), "option", TCL_EXACT, &idx) != TCL_OK) { return -1; } if (idx == 0 /* -force */) { @@ -1082,8 +1081,8 @@ TclFileAttrsCmd( goto end; } - if (Tcl_GetIndexFromObj(interp, objv[0], attributeStrings, - "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[0], attributeStrings, + sizeof(char *), "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { @@ -1110,8 +1109,8 @@ TclFileAttrsCmd( } for (i = 0; i < objc ; i += 2) { - if (Tcl_GetIndexFromObj(interp, objv[i], attributeStrings, - "option", 0, &index) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[i], attributeStrings, + sizeof(char *), "option", 0, &index) != TCL_OK) { goto end; } if (attributeStringsAllocated != NULL) { @@ -1200,8 +1199,8 @@ TclFileLinkCmd( static const char *const linkTypes[] = { "-symbolic", "-hard", NULL }; - if (Tcl_GetIndexFromObj(interp, objv[1], linkTypes, "switch", 0, - &linkAction) != TCL_OK) { + if (Tcl_GetIndexFromObjStruct(interp, objv[1], linkTypes, + sizeof(char *), "switch", 0, &linkAction) != TCL_OK) { return TCL_ERROR; } if (linkAction == 0) { |