#include "ink.h"
|
|
#include <stdio.h>
|
|
|
|
int main(int argc, char** argv) {
|
|
char read_buffer[2048];
|
|
struct context* ctx = ink_make_default_context();
|
|
char** end_argv = argv + argc;
|
|
for(argv+=1; argv != end_argv; argv++) {
|
|
FILE* file = fopen(*argv, "r");
|
|
size_t cnt = fread(read_buffer, 1, 2047, file);
|
|
if(cnt == 0) {
|
|
|
|
}
|
|
read_buffer[cnt] = 0;
|
|
ink_run(ctx, read_buffer);
|
|
fclose(file);
|
|
}
|
|
|
|
return ctx->panic;
|
|
}
|