diff options
-rw-r--r-- | xfontsel.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -443,17 +443,21 @@ void GetFontNames(XtPointer closure) { Display *dpy = (Display*)closure; ParseRec *parseRec; - int f, field, count; + int count; char **fontNames; - Boolean *b; int work_priority = 0; fontNames = XListFonts(dpy, AppRes.pattern, 32767, &numFonts); fonts = (FontValues*)XtMalloc( numFonts*sizeof(FontValues) ); fontInSet = (Boolean*)XtMalloc( numFonts*sizeof(Boolean) ); - for (f = numFonts, b = fontInSet; f; f--, b++) *b = True; - for (field = 0; field < FIELD_COUNT; field++) { + { + int f; + Boolean *b; + for (f = numFonts, b = fontInSet; f; f--, b++) + *b = True; + } + for (int field = 0; field < FIELD_COUNT; field++) { fieldValues[field] = (FieldValueList*)XtMalloc(sizeof(FieldValueList)); fieldValues[field]->allocated = 1; fieldValues[field]->count = 0; |