cleanup
This commit is contained in:
parent
e07dc10343
commit
c90ae23253
20
bar.c
20
bar.c
|
@ -938,26 +938,26 @@ parse_font_list (char *str)
|
|||
if (!str)
|
||||
return;
|
||||
|
||||
tok = strtok(str, ",");
|
||||
if (tok) {
|
||||
mfont = tok; // font face
|
||||
mfont = str; // font face
|
||||
|
||||
// if a colon is found
|
||||
// check for a colon
|
||||
tok = strtok(mfont, ":");
|
||||
// if there's a string before the colon
|
||||
if(tok) {
|
||||
// treat the string before the colon as the font face
|
||||
mfont = tok; // font face
|
||||
mfont = tok;
|
||||
|
||||
// if characters exist after the colon
|
||||
// check for characters after the colon
|
||||
tok = strtok(NULL, ":");
|
||||
// if they exist
|
||||
if(tok) {
|
||||
double candidate_size;
|
||||
// convert them to a double
|
||||
candidate_size = atof(tok);
|
||||
// and the size is non-zero
|
||||
// if the size is non-zero
|
||||
if(candidate_size != 0) {
|
||||
// treat the rest of the string as the font size
|
||||
mfont_size = candidate_size; // font size
|
||||
}
|
||||
// use as the new font size
|
||||
mfont_size = candidate_size;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user