blob: e26cb46447acedf7399afb0bc00a0bde26b6ea84 (
plain) (
tree)
|
|
#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; }
|