char *d, *s;
char *d; const char *s;
static void xlatlognam(Filename *dest, Filename src,		       char *hostname, struct tm *tm) {    char buf[10], *bufp;    int size;    char buffer[FILENAME_MAX];    int len = sizeof(buffer)-1;    char *d, *s;    d = buffer;    s = filename_to_str(src);    while (*s) {	/* Let (bufp, len) be the string to append. */	bufp = buf;		       /* don't usually override this */	if (*s == '&') {	    char c;	    s++;	    size = 0;	    if (*s) switch (c = *s++, tolower(c)) {	      case 'y':		size = strftime(buf, sizeof(buf), "%Y", tm);		break;	      case 'm':		size = strftime(buf, sizeof(buf), "%m", tm);		break;	      case 'd':		size = strftime(buf, sizeof(buf), "%d", tm);		break;	      case 't':		size = strftime(buf, sizeof(buf), "%H%M%S", tm);		break;	      case 'h':		bufp = hostname;		size = strlen(bufp);		break;	      default:		buf[0] = '&';		size = 1;		if (c != '&')		    buf[size++] = c;	    }	} else {	    buf[0] = *s++;	    size = 1;	}	if (size > len)	    size = len;	memcpy(d, bufp, size);	d += size;	len -= size;    }    *d = '\0';    *dest = filename_from_str(s);}