summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Jackson <ajax@nwnk.net>2005-11-14 20:40:42 +0000
committerAdam Jackson <ajax@nwnk.net>2005-11-14 20:40:42 +0000
commit70a8aeb19223cc6db9ff6fc1335e3ef94bbb9253 (patch)
tree05c6445c7f9b1a1948da7ab1f51faf814f1f90ac
parent659b2a75a690838dc37ae488d0295c4c594978ce (diff)
Bug #5047: Make font directory attribs work in modular.XORG-6_8_99_903
-rw-r--r--src/fontfile/dirfile.c10
-rw-r--r--src/fontfile/fontdir.c18
2 files changed, 0 insertions, 28 deletions
diff --git a/src/fontfile/dirfile.c b/src/fontfile/dirfile.c
index 5004922..f390391 100644
--- a/src/fontfile/dirfile.c
+++ b/src/fontfile/dirfile.c
@@ -58,10 +58,8 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
char file_name[MAXFONTFILENAMELEN];
char font_name[MAXFONTNAMELEN];
char dir_file[MAXFONTFILENAMELEN];
-#ifdef FONTDIRATTRIB
char dir_path[MAXFONTFILENAMELEN];
char *ptr;
-#endif
FILE *file;
int count,
i,
@@ -74,7 +72,6 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
if (strlen(directory) + 1 + sizeof(FontDirFile) > sizeof(dir_file))
return BadFontPath;
-#ifdef FONTDIRATTRIB
/* Check for font directory attributes */
#if !defined(__UNIXOS2__) && !defined(WIN32)
if ((ptr = strchr(directory, ':'))) {
@@ -88,9 +85,6 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
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);
@@ -147,11 +141,7 @@ FontFileReadDirectory (char *directory, FontDirectoryPtr *pdir)
} 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);
diff --git a/src/fontfile/fontdir.c b/src/fontfile/fontdir.c
index 29fe06b..aae1f2e 100644
--- a/src/fontfile/fontdir.c
+++ b/src/fontfile/fontdir.c
@@ -107,12 +107,9 @@ FontFileMakeDir(char *dirName, int size)
FontDirectoryPtr dir;
int dirlen;
int needslash = 0;
-#ifdef FONTDIRATTRIB
char *attrib;
int attriblen;
-#endif
-#ifdef FONTDIRATTRIB
#if !defined(__UNIXOS2__) && !defined(WIN32)
attrib = strchr(dirName, ':');
#else
@@ -126,20 +123,13 @@ FontFileMakeDir(char *dirName, int size)
dirlen = strlen(dirName);
attriblen = 0;
}
-#else
- dirlen = strlen(dirName);
-#endif
if (dirName[dirlen - 1] != '/')
#ifdef NCD
if (dirlen) /* leave out slash for builtins */
#endif
needslash = 1;
-#ifdef FONTDIRATTRIB
dir = (FontDirectoryPtr) xalloc(sizeof *dir + dirlen + needslash + 1 +
(attriblen ? attriblen + 1 : 0));
-#else
- dir = (FontDirectoryPtr) xalloc(sizeof *dir + dirlen + needslash + 1);
-#endif
if (!dir)
return (FontDirectoryPtr)0;
if (!FontFileInitTable (&dir->scalable, 0))
@@ -156,7 +146,6 @@ FontFileMakeDir(char *dirName, int size)
dir->directory = (char *) (dir + 1);
dir->dir_mtime = 0;
dir->alias_mtime = 0;
-#ifdef FONTDIRATTRIB
if (attriblen)
dir->attributes = dir->directory + dirlen + needslash + 1;
else
@@ -165,9 +154,6 @@ FontFileMakeDir(char *dirName, int size)
dir->directory[dirlen] = '\0';
if (dir->attributes)
strcpy(dir->attributes, attrib);
-#else
- strcpy(dir->directory, dirName);
-#endif
if (needslash)
strcat(dir->directory, "/");
return dir;
@@ -633,9 +619,7 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
FontScalableExtraPtr extra;
FontEntryPtr bitmap = 0, scalable;
Bool isscale;
-#ifdef FONTDIRATTRIB
Bool scalable_xlfd;
-#endif
renderer = FontFileMatchRenderer (fileName);
if (!renderer)
@@ -661,7 +645,6 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
(vals.values_supplied & PIXELSIZE_MASK) != PIXELSIZE_ARRAY &&
(vals.values_supplied & POINTSIZE_MASK) != POINTSIZE_ARRAY &&
!(vals.values_supplied & ENHANCEMENT_SPECIFY_MASK);
-#ifdef FONTDIRATTRIB
#define UNSCALED_ATTRIB "unscaled"
scalable_xlfd = (isscale &&
(((vals.values_supplied & PIXELSIZE_MASK) == 0) ||
@@ -689,7 +672,6 @@ FontFileAddFontFile (FontDirectoryPtr dir, char *fontName, char *fileName)
ptr1 = ptr2 + 1;
} while (ptr2);
}
-#endif
if (!isscale || (vals.values_supplied & SIZE_SPECIFY_MASK))
{
/*