Tcl_SetResult(interp, "Directory not found", TCL_STATIC);
Tcl_SetResult(interp, "Cannot read directory", TCL_STATIC);
int ReaddirCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]){	DIR *dirp;	struct dirent *dp;	Tcl_Obj *tcl_result;	char *path;	if (objc != 2) {		Tcl_WrongNumArgs(interp, 1, objv, "directory");		return TCL_ERROR;	}	path = Tcl_GetString(objv[1]);	dirp = opendir(path);	if (!dirp) {		Tcl_SetResult(interp, "Directory not found", TCL_STATIC);		return TCL_ERROR;	}	tcl_result = Tcl_NewListObj(0, NULL);	while ((dp = readdir(dirp))) {		Tcl_ListObjAppendElement(interp, tcl_result, Tcl_NewStringObj(dp->d_name, -1));	}	closedir(dirp);	Tcl_SetObjResult(interp, tcl_result);		return TCL_OK;}