summaryrefslogtreecommitdiff
path: root/out.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-10-20 11:39:21 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-10-20 11:39:21 -0400
commit89f00af3cf25d594f10aebaa7048a17bdd520c4b (patch)
treebbb22f3ffe808bca6849fd66693b094221a047fb /out.c
parentbfd0a7f6fbf22914631337b3871011f452d3fb94 (diff)
improved new; new slices
Diffstat (limited to 'out.c')
-rw-r--r--out.c35
1 files changed, 8 insertions, 27 deletions
diff --git a/out.c b/out.c
index 450acad..d165db8 100644
--- a/out.c
+++ b/out.c
@@ -18,7 +18,6 @@ typedef struct { void *data; u64 n; } slice_;
/* declarations */
void puti(i64 x);
-void asdf(i64( (*x)[3]), i64 y, i64(*ret0_), i64((*ret1_)[3]));
void main__(void);
/* code */
int main() {
@@ -26,35 +25,17 @@ int main() {
return 0;
}
-#include <stdio.h>
-;
void puti(i64 x) {
-{
- printf("%ld\n", (long)x);
-}}
-
-
-void asdf(i64( (*x)[3]), i64 y, i64(*ret0_), i64((*ret1_)[3])) {
-{
-}(*ret0_) = y;{
-size_t i;i64(*arr__in) = (*x); i64(*arr__out) = (*ret1_);
-for (i = 0; i < 3; i++) arr__out[i] = arr__in[i];
-}return;
-}
+ {
+ }}
void main__(void) {
-{
- i64( a[3]) = {0};
- i64 b = 0;
- (a[0]) = 17;;
- b = 5489;;
- i64 c; i64( d[3]); asdf(&a, b, &c, &d);
-
- (puti(c));
- (puti((d[0])));
- void (* asdfasdf)(i64((*)[3]), i64, i64(*), i64((*)[3])); {
- void (* expr__)(i64((*)[3]), i64, i64(*), i64((*)[3])); expr__ = asdf;asdfasdf = expr__;}
-}}
+ {
+ i64((* Ar)[5]); {
+ i64((* expr__)[5]); expr__ = ((i64((*)[5]))calloc(1, sizeof(i64([5]))));Ar = expr__;}
+ slice_ A; {
+ slice_ expr__; slice_ a0_; a0_.data = calloc(100, sizeof(i64)); a0_.n = 100;expr__ = a0_;A = expr__;}
+ }}