aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorBad Diode <bd@badd10de.dev>2021-01-25 22:01:00 +0100
committerBad Diode <bd@badd10de.dev>2021-01-25 22:01:00 +0100
commite24186fc1917c5e8b91924af0c3c7c55816ff5d6 (patch)
tree6b20f24824736e822ba614811f312a7c7c2fd43b /src/main.c
downloadmic-e24186fc1917c5e8b91924af0c3c7c55816ff5d6.tar.gz
mic-e24186fc1917c5e8b91924af0c3c7c55816ff5d6.zip
Introducing MIC
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..52728ef
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,25 @@
1#include "platform_posix.c"
2
3int
4main(void) {
5 // App initialization.
6 AppAPI api = {0};
7 AppState state = {0};
8 if (!_app_init(&api, &state, PLATFORM_API)) {
9 return EXIT_FAILURE;
10 }
11
12 // Main loop.
13 for (;;) {
14 if (!_app_reload(&api, &state, PLATFORM_API)) {
15 continue;
16 }
17 if (!api.step(&state, PLATFORM_API)) {
18 break;
19 }
20 }
21
22 // Cleanup.
23 _app_destroy(&api, &state, PLATFORM_API);
24 return EXIT_SUCCESS;
25}