blob: e26cb46447acedf7399afb0bc00a0bde26b6ea84 (
plain) (
blame)
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
|
#include <IO/IOStream.h>
#include <stdio.h>
#include <cpp.h>
#include <String.h>
IOStream stdio;
int Main(String *args); // FWIK app main
extern "C" int main(char **args) {
stdio.term = 0;
Node zero(libc::term);
if (zero.info.type & FT_TERMINAL) {
stdio.term = new Term(zero);
}
int argc = 0;
while (args[argc] != 0) argc++;
String s_args[argc+1];
for (int i = 0; i < argc; i++) s_args[i] = args[i];
Main(s_args);
}
// C++ support
//Enables pure virtual functions
extern "C" void __cxa_pure_virtual() {
//do nothing
}
//Enables global objects
void *__dso_handle;
extern "C" int __cxa_atexit(void (*f)(void*), void *p, void *d) { return 0; }
|