summaryrefslogtreecommitdiff
path: root/src/user/lib/fwik/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/user/lib/fwik/include')
-rw-r--r--src/user/lib/fwik/include/IO/Dir.h24
-rw-r--r--src/user/lib/fwik/include/IO/IOStream.h39
-rw-r--r--src/user/lib/fwik/include/IO/Node.h32
-rw-r--r--src/user/lib/fwik/include/IO/Term.h33
-rw-r--r--src/user/lib/fwik/include/String.h42
-rw-r--r--src/user/lib/fwik/include/cpp.h16
6 files changed, 0 insertions, 186 deletions
diff --git a/src/user/lib/fwik/include/IO/Dir.h b/src/user/lib/fwik/include/IO/Dir.h
deleted file mode 100644
index bbfe3ed..0000000
--- a/src/user/lib/fwik/include/IO/Dir.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef DEF_FWIK_IO_DIR_H
-#define DEF_FWIK_IO_DIR_H
-
-#include "Node.h"
-#include <String.h>
-
-class Dir : public Node {
- void _init();
-
- public:
- int pos;
-
- Dir(FILE f);
- Dir(const char* file, int mode);
- Dir(const Node &n);
- virtual ~Dir();
-
- String read_ent();
-
- virtual Dir* as_dir() { return this; }
-};
-
-#endif
-
diff --git a/src/user/lib/fwik/include/IO/IOStream.h b/src/user/lib/fwik/include/IO/IOStream.h
deleted file mode 100644
index 2e33268..0000000
--- a/src/user/lib/fwik/include/IO/IOStream.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef DEF_FWIK_IO_IOSTREAM_H
-#define DEF_FWIK_IO_IOSTREAM_H
-
-#include "Term.h"
-
-#include <String.h>
-
-class IOStream {
- public:
- Term *term;
-
- IOStream() : term(0) {}
- IOStream(Term *t) : term(t) {}
-
- void print(const char* str);
- void printf(const char* fmt, ...);
- String readln();
-
- IOStream &operator<<(const char* s) {
- print(s);
- return *this;
- }
- IOStream &operator<<(const String& s) {
- print(s.c_str());
- return *this;
- }
- IOStream &operator<<(int i) {
- printf("%d", i);
- return *this;
- }
- IOStream &operator<<(void* p) {
- printf("%p", p);
- return *this;
- }
-};
-
-extern IOStream stdio;
-
-#endif
diff --git a/src/user/lib/fwik/include/IO/Node.h b/src/user/lib/fwik/include/IO/Node.h
deleted file mode 100644
index 6b5b063..0000000
--- a/src/user/lib/fwik/include/IO/Node.h
+++ /dev/null
@@ -1,32 +0,0 @@
-#ifndef DEF_FWIK_IO_NODE_H
-#define DEF_FWIK_IO_NODE_H
-
-#include <tce/syscall.h>
-#include <tce/vfs.h>
-#include <stdio.h>
-#include <cpp.h>
-
-#include <String.h>
-
-class Term;
-class Dir;
-class Node {
- public:
- FILE fd;
- file_info info;
- int error; // will be 0 if this is a valid file descriptor
-
- Node(FILE f);
- Node(const char* filename, int mode);
- Node(FILE parent, const char* filename, int mode);
- virtual ~Node() {}
-
- void close();
-
- virtual Term* as_term() { return 0; }
- virtual Dir* as_dir() { return 0; }
-};
-
-String path_cat(const String &a, const String &b, bool trailing_slash = true);
-
-#endif
diff --git a/src/user/lib/fwik/include/IO/Term.h b/src/user/lib/fwik/include/IO/Term.h
deleted file mode 100644
index 5b8aba3..0000000
--- a/src/user/lib/fwik/include/IO/Term.h
+++ /dev/null
@@ -1,33 +0,0 @@
-#ifndef DEF_FWIK_IO_TERM_H
-#define DEF_FWIK_IO_TERM_H
-
-#include <stdio.h>
-#include "Node.h"
-#include <String.h>
-
-#include <readline.h>
-
-class Term : public Node {
- int w, h;
-
- readline_history hist;
-
- void _init();
-
- public:
- Term(FILE f);
- Term(const char* filename, int mode);
- Term(const Node &n);
- virtual ~Term();
-
- virtual void print(const char *s);
- virtual void printf(const char* fmt, ...);
- virtual void vprintf(const char* fmt, va_list ap);
- virtual String readln();
- String readline();
-
- virtual Term* as_term() { return this; }
-};
-
-#endif
-
diff --git a/src/user/lib/fwik/include/String.h b/src/user/lib/fwik/include/String.h
deleted file mode 100644
index 59fa0b6..0000000
--- a/src/user/lib/fwik/include/String.h
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef DEF_FWIK_STRING_H
-#define DEF_FWIK_STRING_H
-
-#include <cpp.h>
-
-class String {
- private:
- char *ptr; // zero-terminated for internal purposes.
- int len;
-
- public:
- String();
- String(const String& other);
- String(const char* ptr);
- String(const char* ptr, int len);
- String(char c, int count);
- ~String();
- void operator=(const String &string);
- void operator=(const char* ptr);
-
- const char* c_str() const;
-
- bool operator==(const String& other) const;
- bool operator==(const char* other) const;
- bool operator<(const String& other) const;
- char &operator[](int pos);
- char operator[](int pos) const;
-
- int size() const { return len; }
- operator bool() const { return len != 0; }
- String substr(int start, int count) const;
-
- String operator+(const String& other) const;
- void operator+=(const String& other);
- void operator+=(char c);
-
- static String dec(int i);
- static String hex(uint32_t v);
- static String sprintf(const char* format, ...);
-};
-
-#endif
diff --git a/src/user/lib/fwik/include/cpp.h b/src/user/lib/fwik/include/cpp.h
deleted file mode 100644
index 5b66ba1..0000000
--- a/src/user/lib/fwik/include/cpp.h
+++ /dev/null
@@ -1,16 +0,0 @@
-#ifndef DEF_FWIK_CPPSUPPORT_H
-#define DEF_FWIK_CPPSUPPORT_H
-
-#include <stdlib.h>
-
-inline void* operator new(size_t, void* p) throw() { return p; }
-inline void* operator new[](size_t, void* p) throw() { return p; }
-inline void operator delete (void*, void*) throw() { };
-inline void operator delete[](void*, void*) throw() { };
-
-inline void* operator new (size_t size) { return malloc(size); }
-inline void* operator new[] (size_t size) { return malloc(size); }
-inline void operator delete (void* ptr) { return free(ptr); }
-inline void operator delete[] (void* ptr) { return free(ptr); }
-
-#endif