Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ThomasKuehne
xfontsel
Commits
3a2923e9
Commit
3a2923e9
authored
Dec 05, 2021
by
ThomasKuehne
Committed by
Alan Coopersmith
May 15, 2022
Browse files
Fixed -Wshadow declaration warnings
parent
770bea4b
Pipeline
#586869
failed with stages
in 21 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
xfontsel.c
View file @
3a2923e9
...
...
@@ -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
**
f
ield
Values
=
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
=
f
ield
Values
[
f
]
->
count
,
v
=
f
ield
Values
[
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
=
f
ield
Values
[
f
]
->
count
++
;
if
(
count
==
f
ield
Values
[
f
]
->
allocated
)
{
int
allocated
=
(
f
ield
Values
[
f
]
->
allocated
+=
10
);
f
ield
Values
[
f
]
=
(
FieldValueList
*
)
XtRealloc
(
(
char
*
)
f
ield
Values
[
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
=
&
f
ield
Values
[
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
]
=
f
ield
Values
[
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
,
*
s
fonts
;
int
ocount
,
ncount
,
count
;
if
(
fval
->
string
&&
!
strcmp
(
fval
->
string
,
"0"
))
continue
;
count
=
numScaledFonts
;
fonts
=
scaledFonts
;
s
fonts
=
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
(
*
s
fonts
<
*
ofonts
)
{
*
nfonts
++
=
*
s
fonts
++
;
count
--
;
}
else
if
(
*
fonts
==
*
ofonts
)
{
*
nfonts
++
=
*
fonts
++
;
}
else
if
(
*
s
fonts
==
*
ofonts
)
{
*
nfonts
++
=
*
s
fonts
++
;
count
--
;
ofonts
++
;
ocount
--
;
...
...
@@ -657,7 +657,7 @@ static void AddScalables(int f)
ocount
--
;
}
while
(
count
)
{
*
nfonts
++
=
*
fonts
++
;
*
nfonts
++
=
*
s
fonts
++
;
count
--
;
}
XtFree
((
char
*
)
oofonts
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment