-
Notifications
You must be signed in to change notification settings - Fork 0
/
ecaterm.c
38 lines (28 loc) · 786 Bytes
/
ecaterm.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*
ecaterm.c
Copyright (c) 2018 andynines
MIT License
*/
// Includes
#include <stdlib.h>
#include "eca.h"
#include "ecaio.h"
// Test
int main(int argc, char* argv[]) {
Simulation* simPtr;
extern Simulation* createUserSim(int argc, char* argv[]);
extern void iterateSim(Simulation* simPtr, int iterations);
extern void infoStr(Simulation* simPtr);
extern void simOut(Simulation* simPtr);
extern void destroySim(Simulation* simPtr);
simPtr = createUserSim(argc, argv);
if (simPtr == (Simulation*) 0) {
return EXIT_FAILURE;
} else {
iterateSim(simPtr, (simPtr->genBufferSize) - 1); // Just enough to fill buffer
infoStr(simPtr);
simOut(simPtr);
destroySim(simPtr);
return EXIT_SUCCESS;
}
}