From 30690c1d836b3d703b6f3667be9ea132ff02c311 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 11 Apr 2024 09:40:04 -0700 Subject: [PATCH] Housekeeping --- src/modal.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modal.c b/src/modal.c index 781a801..af1d47a 100644 --- a/src/modal.c +++ b/src/modal.c @@ -168,28 +168,28 @@ create_rule(Rule *r, int id, char *s) static int rewrite(void) { - char c, last = 0, *p = dst ? bank_b : bank_a, *res; - while((c = *p) && c <= ' ') p++; - while((c = *p)) { + char c, last = 0, *s = dst ? bank_b : bank_a, *res; + while((c = *s) && c <= ' ') s++; + while((c = *s)) { if(spacer(last)) { Rule *r; - if(p[0] == '<' && p[1] == '>') { + if(s[0] == '<' && s[1] == '>') { r = rules_++; - p = create_rule(r, rules_ - rules - 1, p); - return commit_rule(r, p, 1); + s = create_rule(r, rules_ - rules - 1, s); + return commit_rule(r, s, 1); } - if(p[0] == '?' && p[1] == '(') { + if(s[0] == '?' && s[1] == '(') { r = λ - p = create_rule(&lambda, -1, p) + 1; - if((res = match_rule(&lambda, p)) != NULL) + s = create_rule(&lambda, -1, s) + 1; + if((res = match_rule(&lambda, s)) != NULL) return write_rule(&lambda, last, res); } for(r = rules; r < rules_; r++) - if((res = match_rule(r, p)) != NULL) + if((res = match_rule(r, s)) != NULL) return write_rule(r, last, res); } *outp_++ = last = c; - p++; + s++; } *outp_++ = 0; return 0;