char	dir_path[MAXFONTNAMELEN];
char	dir_path[MAXFONTFILENAMELEN];
FontFileReadDirectory (directory, pdir)    char		*directory;    FontDirectoryPtr	*pdir;{    char        file_name[MAXFONTNAMELEN];    char        font_name[MAXFONTNAMELEN];    char        dir_file[MAXFONTNAMELEN];#ifdef FONTDIRATTRIB    char	dir_path[MAXFONTNAMELEN];    char	*ptr;#endif    FILE       *file;    int         count,                i,                status;    struct stat	statb;    FontDirectoryPtr	dir = NullFontDirectory;#ifdef FONTDIRATTRIB    /* Check for font directory attributes */#ifndef __EMX__    if (ptr = strchr(directory, ':')) {#else    /* OS/2 path might start with a drive letter, don't clip this */    if (ptr = strchr(directory+2, ':')) {#endif	strncpy(dir_path, directory, ptr - directory);	dir_path[ptr - directory] = '\0';    } else {	strcpy(dir_path, directory);    }    strcpy(dir_file, dir_path);#else    strcpy(dir_file, directory);#endif    if (dir_file[strlen(dir_file) - 1] != '/')	strcat(dir_file, "/");    strcat(dir_file, FontDirFile);    file = fopen(dir_file, "r");    if (file) {	if (fstat (fileno(file), &statb) == -1)	    return BadFontPath;	count = fscanf(file, "%d\n", &i);	if ((count == EOF) || (count != 1)) {	    fclose(file);	    return BadFontPath;	}	dir = FontFileMakeDir(directory, i);	if (dir == NULL) {	    fclose(file);	    return BadFontPath;	}	dir->dir_mtime = statb.st_mtime;	while ((count = fscanf(file, "%s %[^\n]\n", file_name, font_name)) != EOF) {#ifdef __EMX__	    /* strip any existing trailing CR */	    for (i=0; i<strlen(font_name); i++) {		if (font_name[i]=='\r') font_name[i] = '\0';	    }#endif	    if (count != 2) {		FontFileFreeDir (dir);		fclose(file);		return BadFontPath;	    }	    if (!FontFileAddFontFile (dir, font_name, file_name))	    {		FontFileFreeDir (dir);		fclose(file);		return BadFontPath;	    }	}	fclose(file);    } else if (errno != ENOENT) {	return BadFontPath;    }#ifdef FONTDIRATTRIB    status = ReadFontAlias(dir_path, FALSE, &dir);#else    status = ReadFontAlias(directory, FALSE, &dir);#endif    if (status != Successful) {	if (dir)	    FontFileFreeDir (dir);	return status;    }    if (!dir)	return BadFontPath;    FontFileSortDir(dir);    *pdir = dir;    return Successful;}