prototype IR and parser
[henge/webcc.git] / src / henge / core / io.c
1 /*!@file
2 \brief I/O system
3 \details Transpilable I/O system for web and native, including log abstraction
4 \author K
5 \date 2016
6 ------------------------------------------------------------------------------*/
7 #ifdef __EMSCRIPTEN__
8 /* Web Environment */
9 #include <SDL_ttf.h>
10 #include <emscripten/emscripten.h>
11 #else
12 /* Traditional Environment */
13 #ifdef __Win32
14 #include <windows.h>
15 #endif //__Win32
16 #include <SDL2/SDL_ttf.h>
17 #endif
18 /* ENVIRONMENT-AGNOSTIC DEFINES */
19 #include <SDL2/SDL.h>
20 #include <SDL2/SDL_image.h>
21 #include <stdint.h>
22 #include <setjmp.h>
23 #include <stdio.h>
24
25 /* exposed functions */
26 int io_init(void);
27 const char* io_get_error(void);
28 void io_quit(void);
29
30 /** IO initializer */
31 int
32 io_init()
33 { return 0;
34 }
35
36 const char*
37 io_get_error()
38 { static char err[5] = "Ass!";
39 return (const char*)&err;
40 }
41
42 void
43 io_quit()
44 {
45 }
46