summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/main.cpp
diff options
context:
space:
mode:
authorAlex AUVOLAT <alexis211@gmail.com>2012-05-19 11:45:49 +0200
committerAlex AUVOLAT <alexis211@gmail.com>2012-05-19 11:45:49 +0200
commit499ca6c243b05da176a2d4bd9a2317f0b28afc7f (patch)
treef55ff788632b017ab8de83b71ad02b0998e1dda5 /src/user/lib/fwik/main.cpp
parent7b466345af0d3a7dc5622617ce443a90c64e34a4 (diff)
downloadTCE-499ca6c243b05da176a2d4bd9a2317f0b28afc7f.tar.gz
TCE-499ca6c243b05da176a2d4bd9a2317f0b28afc7f.zip
Introducing FWIK, the userland C++ framework. Far from complete.
Diffstat (limited to 'src/user/lib/fwik/main.cpp')
-rw-r--r--src/user/lib/fwik/main.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/user/lib/fwik/main.cpp b/src/user/lib/fwik/main.cpp
new file mode 100644
index 0000000..8e2e289
--- /dev/null
+++ b/src/user/lib/fwik/main.cpp
@@ -0,0 +1,30 @@
+#include <IO/IOStream.h>
+#include <stdio.h>
+#include <cpp.h>
+
+IOStream stdio;
+
+int Main(char **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);
+ }
+ Main(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; }
+
+