From d80725f4c8da12dfab32533dffc2c77f6b435082 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Thu, 4 Apr 2024 11:38:39 -0700 Subject: [PATCH] * --- src/modal.c | 5 ++--- test.modal | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/modal.c b/src/modal.c index 6413661..35b4c26 100644 --- a/src/modal.c +++ b/src/modal.c @@ -89,9 +89,8 @@ tokenize(char *t, FILE *f) r->a = parse_rulefrag(f), r->b = parse_rulefrag(f); return; } - while(f && fread(&c, 1, 1, f) && c && c != 0xa) - *prog_++ = c; - *prog_++ = 0x20; + while(f && fread(&c, 1, 1, f) && c) + *prog_++ = c == 0xa ? 0x20 : c; } static int diff --git a/test.modal b/test.modal index 05359ed..10e1116 100644 --- a/test.modal +++ b/test.modal @@ -1,3 +1,5 @@ +<> (?x world) (?x whurl) <> (?b bar) (?b baz) +(hello world) ((foo baz) bar) \ No newline at end of file