You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: tis.c
+63-6
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,7 @@
8
8
9
9
#include"tis_types.h"
10
10
#include"tis_node.h"
11
+
#include"tis_io.h"
11
12
12
13
#defineINIT_OK 0
13
14
#defineINIT_FAIL 1
@@ -85,11 +86,11 @@ int init_layout(tis_t* tis, char* layoutfile, int layoutmode) {
85
86
86
87
tis->size=tis->rows*tis->cols;
87
88
88
-
if(tis->size==0) {
89
+
if(tis->cols==0) {
89
90
if(layout!=NULL) {
90
91
fclose(layout);
91
92
}
92
-
error("Cannot initialize with zero rows or columns\n"); // But zero rows are fine, right? TODO this would mean I have to run the outputs separately from the bottom row
93
+
error("Cannot initialize with zero columns\n"); // But zero rows are fine, it works as a translator: printf "hello" | ./tis -l /dev/null "0 1 I0 ASCII - O0 NUMERIC - 10"
93
94
returnINIT_FAIL;
94
95
}
95
96
@@ -164,7 +165,9 @@ int init_layout(tis_t* tis, char* layoutfile, int layoutmode) {
if(node->row==0) { // if reading up from top row, read input instead
144
-
returninput(tis->inputs[node->col], value); // TODO experiment: can io read happen every tick, or only every other? -> read is every other, starting with a prep cycle
0 commit comments