diff options
author | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-14 22:24:15 -0400 |
---|---|---|
committer | Leo Tenenbaum <pommicket@gmail.com> | 2019-10-14 22:24:15 -0400 |
commit | c3ca8aec22cae9011fbd3a718e969634876fa858 (patch) | |
tree | 93d61a1b3b6f4c80aa5725edbdae25e78f88970d /out.c | |
parent | 089b01e0849b9eb01b5ab542b0baabe2d6ce1865 (diff) |
minor improvements, including output indentation
Diffstat (limited to 'out.c')
-rw-r--r-- | out.c | 30 |
1 files changed, 20 insertions, 10 deletions
@@ -18,7 +18,8 @@ typedef unsigned char bool; /* declarations */ i64 puti(i64 i); void dbl(i64((* x)[3])); -void main__(); +i64 foo(void); +void main__(void); /* code */ int main() { main__(); @@ -26,19 +27,28 @@ int main() { } i64 puti(i64 i) { -printf("%ld\n", i); + printf("%ld\n", i); } void dbl(i64((* x)[3])) { -((*x)[0]) = (((*x)[0])*2);; -((*x)[1]) = (((*x)[1])*2);; -((*x)[2]) = (((*x)[2])*2);; + ((*x)[0]) = (((*x)[0])*2);; + ((*x)[1]) = (((*x)[1])*2);; + ((*x)[2]) = (((*x)[2])*2);; } -void main__() { -i64( a[3]) = {0}; -(a[0]) = 1;; -(dbl((&a))); -(puti((a[0]))); +i64 foo(void) { + a = 3;; + if (true) { + a = 4;; + } else if (false) { + a = (17+(1/0));; + }; +} + +void main__(void) { + i64( a[3]) = {0}; + (a[0]) = 1;; + (dbl((&a))); + (puti((a[0]))); } |