strcpy(buf, "/bin/mkdir -p ");
strlcpy(buf, "/bin/mkdir -p ", sizeof buf);
makedirs(filename,striplast)Reg1 char *filename;bool striplast;{    char *tmpbuf;    if ((tmpbuf = strdup(filename)) == NULL)        fatal1("out of memory\n");    if (striplast) {        char *s = strrchr(tmpbuf, '/');	if (s == NULL)	  return; /* nothing to be done */	*s = '\0';    }    strcpy(buf, "/bin/mkdir -p ");    if (strlcat(buf, tmpbuf, sizeof(buf)) >= sizeof(buf))      fatal2("buffer too small to hold %.20s...\n", tmpbuf);    if (system(buf))      pfatal2("%.40s failed", buf);}