sprintf(date+4, "%c%s ", HT_NON_BREAK_SPACE, cpd-1); *cpd = '-';
sprintf(date+4, "%c%.1s ", HT_NON_BREAK_SPACE, cpd-1);
PRIVATE void parse_vms_dir_entry ARGS2(	char *,		line,	EntryInfo *,	entry_info){    int i, j;    unsigned int ialloc;    char *cp, *cpd, *cps, date[16], *sp = " ";    /**  Get rid of blank lines, and information lines.  **/    /**  Valid lines have the ';' version number token.  **/    if (!strlen(line) || (cp = strchr(line, ';')) == NULL) {	entry_info->display = FALSE;	return;    }    /** Cut out file or directory name at VMS version number. **/    *cp++ ='\0';    StrAllocCopy(entry_info->filename,line);    /** Cast VMS non-README file and directory names to lowercase. **/    if (strstr(entry_info->filename, "READ") == NULL) {	LYLowerCase(entry_info->filename);	i = strlen(entry_info->filename);    } else {	i = ((strstr(entry_info->filename, "READ") - entry_info->filename) + 4);	if (!strncmp(&entry_info->filename[i], "ME", 2)) {	    i += 2;	    while (entry_info->filename[i] && entry_info->filename[i] != '.') {		i++;	    }	} else if (!strncmp(&entry_info->filename[i], ".ME", 3)) {	    i = strlen(entry_info->filename);	} else {	    i = 0;	}	LYLowerCase(entry_info->filename + i);    }    /** Uppercase terminal .z's or _z's. **/    if ((--i > 2) &&	entry_info->filename[i] == 'z' &&	(entry_info->filename[i-1] == '.' ||	 entry_info->filename[i-1] == '_'))	entry_info->filename[i] = 'Z';    /** Convert any tabs in rest of line to spaces. **/    cps = cp-1;    while ((cps=strchr(cps+1, '\t')) != NULL)	*cps = ' ';    /** Collapse serial spaces. **/    i = 0; j = 1;    cps = cp;    while (cps[j] != '\0') {	if (cps[i] == ' ' && cps[j] == ' ')	    j++;	else	    cps[++i] = cps[j++];    }    cps[++i] = '\0';    /* Set the years and date, if we don't have them yet. **/    if (!HaveYears) {	set_years_and_date();    }    /** Track down the date. **/    if ((cpd=strchr(cp, '-')) != NULL &&	strlen(cpd) > 9 && isdigit(*(cpd-1)) &&	isalpha(*(cpd+1)) && *(cpd+4) == '-') {	/** Month **/	*(cpd+4) = '\0';	*(cpd+2) = TOLOWER(*(cpd+2));	*(cpd+3) = TOLOWER(*(cpd+3));	sprintf(date, "%s ", cpd+1);	*(cpd+4) = '-';	/** Day **/	*cpd = '\0';	if (isdigit(*(cpd-2)))	    sprintf(date+4, "%s ", cpd-2);	else	    sprintf(date+4, "%c%s ", HT_NON_BREAK_SPACE, cpd-1);	*cpd = '-';	/** Time or Year **/	if (!strncmp(ThisYear, cpd+5, 4) &&	    strlen(cpd) > 15 && *(cpd+12) == ':') {	    *(cpd+15) = '\0';	    sprintf(date+7, "%s", cpd+10);	    *(cpd+15) = ' ';	} else {	    *(cpd+9) = '\0';	    sprintf(date+7, " %s", cpd+5);	    *(cpd+9) = ' ';	}	StrAllocCopy(entry_info->date, date);    }    /** Track down the size **/    if ((cpd=strchr(cp, '/')) != NULL) {	/* Appears be in used/allocated format */	cps = cpd;	while (isdigit(*(cps-1)))	    cps--;	if (cps < cpd)	    *cpd = '\0';	entry_info->size = atoi(cps);	cps = cpd+1;	while (isdigit(*cps))	    cps++;	*cps = '\0';	ialloc = atoi(cpd+1);	/* Check if used is in blocks or bytes */	if (entry_info->size <= ialloc)	    entry_info->size *= 512;    } else if ((cps=strtok(cp, sp)) != NULL) {	/* We just initialized on the version number */	/* Now let's hunt for a lone, size number    */	while ((cps=strtok(NULL, sp)) != NULL) {	    cpd = cps;	    while (isdigit(*cpd))		cpd++;	    if (*cpd == '\0') {		/* Assume it's blocks */		entry_info->size = atoi(cps) * 512;		break;	    }	}    }    /** Wrap it up **/    CTRACE(tfp, "HTFTP: VMS filename: %s  date: %s  size: %d\n",		entry_info->filename,		entry_info->date ? entry_info->date : "",		entry_info->size);    return;} /* parse_vms_dir_entry() */