char *GetMetricFilename(char typefaceNames[][68]) /* An unusual routine that uses the FindBaseName() function below. From four or less typeface names it extracts a family base name and appends ".metric" to it. If the typefaces belong to the same family you get a filename "familyName.metric". If this function returns a null, these types don't belong together. This function is overridden only if the user supplies an alternate .metric filename back in main(). */ { static char familyName[68],baseNames[4][68]; static int match,index; match=1; familyName[0]=0; for (index=0;index<4;index++) strcpy(baseNames[index],FindBaseName(typefaceNames[index])); for (index=1;index<3;index++) if (strcmp(baseNames[index],baseNames[3])!=0) match=0; if (strcmp(baseNames[0],baseNames[3])!=0) if (strcmp(typefaceNames[0],baseNames[3])!=0) match=0; if (match!=0) { strcpy(familyName,baseNames[3]); strcat(familyName,".metric"); } return(familyName); };