summaryrefslogtreecommitdiff
path: root/plugins/befunge.c
diff options
context:
space:
mode:
authorZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-11 17:16:40 +0000
committerZuhaitz Méndez Fernández de Aránguiz <zuhaitz@debian>2026-01-11 17:17:04 +0000
commitd2461482caf9e93d6e2bc7ff17567102f635211a (patch)
treec302d1a2e7cb829b6ed006c905db0b8bbf45f57a /plugins/befunge.c
parentf9b1992795142a073cd5dc1794350fc64e9aa695 (diff)
Fixed some things. Next thing will be tests.
Diffstat (limited to 'plugins/befunge.c')
-rw-r--r--plugins/befunge.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/plugins/befunge.c b/plugins/befunge.c
index 844e27f..92165f4 100644
--- a/plugins/befunge.c
+++ b/plugins/befunge.c
@@ -80,7 +80,8 @@ void befunge_transpile(const char *input_body, const ZApi *api)
if (op >= '0' && op <= '9')
{
fprintf(out,
- " if(string_mode) { stack[sp++] = '%c'; } else { stack[sp++] = %c; }\n",
+ " if(string_mode) { stack[sp++] = '%c'; } else { "
+ "stack[sp++] = %c; }\n",
op, op);
}
else if (op == '"')
@@ -119,13 +120,13 @@ void befunge_transpile(const char *input_body, const ZApi *api)
}
else if (op == '/')
{
- fprintf(out,
- " { long a=stack[--sp]; stack[sp-1]= (a!=0)?stack[sp-1]/a:0; }\n");
+ fprintf(out, " { long a=stack[--sp]; stack[sp-1]= "
+ "(a!=0)?stack[sp-1]/a:0; }\n");
}
else if (op == '%')
{
- fprintf(out,
- " { long a=stack[--sp]; stack[sp-1]= (a!=0)?stack[sp-1]%%a:0; }\n");
+ fprintf(out, " { long a=stack[--sp]; stack[sp-1]= "
+ "(a!=0)?stack[sp-1]%%a:0; }\n");
}
else if (op == '!')
{