snprintf(msg, sizeof msg, "install: mkdir %s\n", path);
*p = ch; snprintf(msg, sizeof msg, "%s: mkdir %s\n", funcname, path);
install_dir(Tcl_Interp *interp, char *path){	char *p;	struct stat sb;	int ch;	for (p = path;; ++p)		if (!*p || (p != path && *p  == '/')) {			ch = *p;			*p = '\0';			if (stat(path, &sb)) {				if (errno != ENOENT || mkdir(path, 0755) < 0) {					char errmsg[255];					snprintf(errmsg, sizeof errmsg, "mkdir %s, %s",						 path, strerror(errno));					Tcl_SetResult(interp, errmsg, TCL_VOLATILE);					return TCL_ERROR;				} else if (verbose) {					char msg[255];					snprintf(msg, sizeof msg, "install: mkdir %s\n", path);					ui_info(interp, msg);				}			} else if (!S_ISDIR(sb.st_mode)) {				char errmsg[255];				snprintf(errmsg, sizeof errmsg, "%s exists but is not a directory", path);				Tcl_SetResult(interp, errmsg, TCL_VOLATILE);				return TCL_ERROR;			}			if (!(*p = ch))				break; 		}	if ((gid != (gid_t)-1 || uid != (uid_t)-1) && chown(path, uid, gid))		/* Don't bother to warn */;	if (chmod(path, mode))		/* Don't bother to warn */;	return TCL_OK;}