inpcom.c, cleanup, use strchr()

This commit is contained in:
h_vogt 2017-04-01 18:22:12 +02:00 committed by rlar
parent 2df8f433f8
commit cf9dbff890
1 changed files with 3 additions and 4 deletions

View File

@ -5431,14 +5431,13 @@ inp_temper_compat(struct line *card)
continue;
}
/* exclude some elements */
if ((*curr_line == '*') || (*curr_line == 'v') || (*curr_line == 'b') || (*curr_line == 'i') ||
(*curr_line == 'e') || (*curr_line == 'g') || (*curr_line == 'f') || (*curr_line == 'h'))
if (strchr("*vbiegfh", curr_line[0]))
continue;
/* exclude all dot commands except .model */
if ((*curr_line == '.') && (!prefix(".model", curr_line)))
if (curr_line[0] == '.' && !prefix(".model", curr_line))
continue;
/* exclude lines not containing 'temper' */
if (strstr(curr_line, "temper") == NULL)
if (!strstr(curr_line, "temper"))
continue;
/* now start processing of the remaining lines containing 'temper' */
/* remove white spaces of everything inside {}*/