transform(), ci_prefix() is case insensitive

thus can use `s' instead of `t'
and ci_prefix() does return a boolean
This commit is contained in:
rlar 2016-05-15 18:13:11 +02:00
parent 6500aeb132
commit f776a24ea7
1 changed files with 5 additions and 5 deletions

View File

@ -329,21 +329,21 @@ transform(dico_t *dico, SPICE_DSTRINGPTR dstr_p, bool incontrol)
t = spice_dstring_value(&tstr);
if (ci_prefix(".PARAM", t) == 1) {
if (ci_prefix(".PARAM", s)) {
/* comment it out */
/* s[0] = '*'; */
category = 'P';
} else if (ci_prefix(".SUBCKT", t) == 1) {
} else if (ci_prefix(".SUBCKT", s)) {
/* split off any "params" tail */
a = spos_("PARAMS:", t);
if (a >= 0)
pscopy(dstr_p, s, 0, a);
category = 'S';
} else if (ci_prefix(".CONTROL", t) == 1) {
} else if (ci_prefix(".CONTROL", s)) {
category = 'C';
} else if (ci_prefix(".ENDC", t) == 1) {
} else if (ci_prefix(".ENDC", s)) {
category = 'E';
} else if (ci_prefix(".ENDS", t) == 1) {
} else if (ci_prefix(".ENDS", s)) {
category = 'U';
} else {
category = '.';