Use addrule function during parsing
This commit is contained in:
parent
3c99fb47f6
commit
f83bb5b2c8
10
src/modal.c
10
src/modal.c
|
@ -179,14 +179,8 @@ static int
|
|||
parse_line(char *line)
|
||||
{
|
||||
if(line[0] == 0) return 1;
|
||||
if(line[0] == '<' && line[1] == '>') {
|
||||
Rule *r = &rules[rules_len++];
|
||||
line += 3;
|
||||
r->a = parse_rulefrag(line);
|
||||
line = walk(line) + 1;
|
||||
r->b = parse_rulefrag(line);
|
||||
return 1;
|
||||
}
|
||||
if(line[0] == '<' && line[1] == '>')
|
||||
return !!addrule(line);
|
||||
while((*prog_++ = *line++))
|
||||
;
|
||||
*prog_++ = 0xa;
|
||||
|
|
Loading…
Reference in New Issue