commit 9febd6d57c98d8d29c6d9abac3839b1614dcae15
parent c6cbb33ef02075c21b519bb59e1c69f74ff8470f
Author: Roberto E. Vargas Caballero <k0ga@shike2.net>
Date: Thu, 11 Dec 2025 12:45:35 +0100
bc: Add a space after relationals
Some dc implementations fail if the macro name is contiguous
to the ] that finalizes the string.
Diffstat:
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/bc.y b/bc.y
@@ -454,7 +454,7 @@ forcode(Macro *d, char *init, char *cmp, char *inc, char *body)
d->id, d->id);
writeout(s);
- s = code("%ss.%s%c", init, cmp, d->id);
+ s = code("%ss.%s%c ", init, cmp, d->id);
nested--;
return s;
@@ -471,7 +471,7 @@ whilecode(Macro *d, char *cmp, char *body)
d->id, d->id);
writeout(s);
- s = code("%s%c", cmp, d->id);
+ s = code("%s%c ", cmp, d->id);
nested--;
return s;
@@ -485,7 +485,7 @@ ifcode(Macro *d, char *cmp, char *body)
s = code("[%s]s%c", body, d->id);
writeout(s);
- s = code("%s%c", cmp, d->id);
+ s = code("%s%c ", cmp, d->id);
nested--;
return s;