xlib complains a lot about fonts with '*' in the XLFD string. Bug

136743, patch by Roland.Mainz@informatik.med.uni-giessen.de (Roland
Mainz), r=bstell, sr=attinasi
This commit is contained in:
bzbarsky%mit.edu 2002-04-30 01:29:14 +00:00
Родитель 36ff5780f1
Коммит 1868273e76
2 изменённых файлов: 10 добавлений и 2 удалений

Просмотреть файл

@ -3744,7 +3744,11 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, nsFontNodeArray* aNodes)
char name[256]; /* X11 font names are never larger than 255 chars */
strcpy(name, list[i]);
if ((!name) || (name[0] != '-')) {
/* Check if we can handle the font name ('*' and '?' are only valid in
* input patterns passed as argument to |XListFont()|&co. but _not_ in
* font names returned by these functions (see bug 136743 ("xlib complains
* a lot about fonts with '*' in the XLFD string"))) */
if ((!name) || (name[0] != '-') || (PL_strpbrk(name, "*?") != nsnull)) {
continue;
}

Просмотреть файл

@ -4045,7 +4045,11 @@ GetFontNames(const char* aPattern, PRBool aAnyFoundry, nsFontNodeArrayXlib* aNod
for (int i = 0; i < count; i++) {
char name[256]; /* X11 font names are never larger than 255 chars */
if ((!list[i]) || (list[i][0] != '-')) {
/* Check if we can handle the font name ('*' and '?' are only valid in
* input patterns passed as argument to |XListFont()|&co. but _not_ in
* font names returned by these functions (see bug 136743 ("xlib complains
* a lot about fonts with '*' in the XLFD string"))) */
if ((!list[i]) || (list[i][0] != '-') || (PL_strpbrk(list[i], "*?") != nsnull)) {
continue;
}