Commit 3a2923e9 authored by ThomasKuehne's avatar ThomasKuehne Committed by Alan Coopersmith
Browse files

Fixed -Wshadow declaration warnings

parent 770bea4b
Pipeline #586869 failed with stages
in 21 seconds
......@@ -507,7 +507,7 @@ void GetFontNames(XtPointer closure)
ScheduleWork(SortFields,(XtPointer)0,work_priority);
SetParsingFontCount(matchingFontCount);
if (strcmp(AppRes.pattern, DEFAULTPATTERN)) {
int maxField, f;
int maxField;
for (f = 0; f < numFonts && !IsXLFDFontName(fontNames[f]); f++);
if (f != numFonts) {
if (Matches(AppRes.pattern, fontNames[f],
......@@ -535,7 +535,7 @@ void ParseFontNames(XtPointer closure)
ParseRec *parseRec = (ParseRec*)closure;
char **fontNames = parseRec->fontNames;
int num_fonts = parseRec->end;
FieldValueList **fieldValues = parseRec->fieldValues;
FieldValueList **fValues = parseRec->fieldValues;
FontValues *fontValues = parseRec->fonts - numBadFonts;
int i, font;
......@@ -562,7 +562,7 @@ void ParseFontNames(XtPointer closure)
while (*p && *++p != DELIM);
len = p - fieldP;
}
for (i=fieldValues[f]->count,v=fieldValues[f]->value; i;i--,v++) {
for (i=fValues[f]->count,v=fValues[f]->value; i;i--,v++) {
if (len == 0) {
if (v->string == NULL) break;
}
......@@ -573,15 +573,15 @@ void ParseFontNames(XtPointer closure)
break;
}
if (i == 0) {
int count = fieldValues[f]->count++;
if (count == fieldValues[f]->allocated) {
int allocated = (fieldValues[f]->allocated += 10);
fieldValues[f] = (FieldValueList*)
XtRealloc( (char *) fieldValues[f],
int count = fValues[f]->count++;
if (count == fValues[f]->allocated) {
int allocated = (fValues[f]->allocated += 10);
fValues[f] = (FieldValueList*)
XtRealloc( (char *) fValues[f],
sizeof(FieldValueList) +
(allocated-1) * sizeof(FieldValue) );
}
v = &fieldValues[f]->value[count];
v = &fValues[f]->value[count];
v->field = f;
if (len == 0)
v->string = NULL;
......@@ -597,7 +597,7 @@ void ParseFontNames(XtPointer closure)
v->enable = True;
i = 1;
}
fontValues->value_index[f] = fieldValues[f]->count - i;
fontValues->value_index[f] = fValues[f]->count - i;
if ((i = v->count++) == v->allocated) {
int allocated = (v->allocated += 10);
v->font = (int*)XtRealloc( (char *) v->font,
......@@ -623,13 +623,13 @@ static void AddScalables(int f)
FieldValue *fval = fieldValues[f]->value;
for (i = 0; i < max; i++, fval++) {
int *oofonts, *ofonts, *nfonts, *fonts;
int *oofonts, *ofonts, *nfonts, *sfonts;
int ocount, ncount, count;
if (fval->string && !strcmp(fval->string, "0"))
continue;
count = numScaledFonts;
fonts = scaledFonts;
sfonts = scaledFonts;
ocount = fval->count;
ncount = ocount + count;
nfonts = (int *)XtMalloc( ncount * sizeof(int) );
......@@ -638,11 +638,11 @@ static void AddScalables(int f)
fval->count = ncount;
fval->allocated = ncount;
while (count && ocount) {
if (*fonts < *ofonts) {
*nfonts++ = *fonts++;
if (*sfonts < *ofonts) {
*nfonts++ = *sfonts++;
count--;
} else if (*fonts == *ofonts) {
*nfonts++ = *fonts++;
} else if (*sfonts == *ofonts) {
*nfonts++ = *sfonts++;
count--;
ofonts++;
ocount--;
......@@ -657,7 +657,7 @@ static void AddScalables(int f)
ocount--;
}
while (count) {
*nfonts++ = *fonts++;
*nfonts++ = *sfonts++;
count--;
}
XtFree((char *)oofonts);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment