diff options
Diffstat (limited to 'x11-libs/libXfont/files/fontpath_unscaled.patch')
-rw-r--r-- | x11-libs/libXfont/files/fontpath_unscaled.patch | 123 |
1 files changed, 123 insertions, 0 deletions
diff --git a/x11-libs/libXfont/files/fontpath_unscaled.patch b/x11-libs/libXfont/files/fontpath_unscaled.patch new file mode 100644 index 000000000000..e872b5ee4870 --- /dev/null +++ b/x11-libs/libXfont/files/fontpath_unscaled.patch @@ -0,0 +1,123 @@ +--- src/fontfile/fontdir.c 2005/07/09 06:36:13 1.5 ++++ src/fontfile/fontdir.c 2005/11/14 20:40:42 1.6 +@@ -107,12 +107,9 @@ + 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 @@ + 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 @@ + 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 @@ + 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 @@ + FontScalableExtraPtr extra; + FontEntryPtr bitmap = 0, scalable; + Bool isscale; +-#ifdef FONTDIRATTRIB + Bool scalable_xlfd; +-#endif + + renderer = FontFileMatchRenderer (fileName); + if (!renderer) +@@ -661,7 +645,6 @@ + (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 @@ + ptr1 = ptr2 + 1; + } while (ptr2); + } +-#endif + if (!isscale || (vals.values_supplied & SIZE_SPECIFY_MASK)) + { + /* +--- src/fontfile/dirfile.c 2005/07/09 06:36:13 1.5 ++++ src/fontfile/dirfile.c 2005/11/14 20:40:42 1.6 +@@ -58,10 +58,8 @@ + 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 @@ + 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 @@ + 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 @@ + } 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); |