summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
Diffstat (limited to 'includes')
-rw-r--r--includes/Exceptions.h6
-rw-r--r--includes/Image.h2
-rw-r--r--includes/Input.h2
-rw-r--r--includes/Output.h2
-rw-r--r--includes/cdreader.h2
5 files changed, 10 insertions, 4 deletions
diff --git a/includes/Exceptions.h b/includes/Exceptions.h
index 49be085..74ad938 100644
--- a/includes/Exceptions.h
+++ b/includes/Exceptions.h
@@ -24,6 +24,7 @@ class Base {
static void free(unsigned char *& p);
static int pipe(int * p, int flag = 0);
static pid_t fork();
+ static void exit(int);
};
class String;
@@ -49,6 +50,7 @@ void xfree(unsigned char *&);
void * xrealloc(void *, size_t);
int xpipe(int *, int = 0) throw (GeneralException);
pid_t xfork() throw (GeneralException);
+void xexit(int) throw (GeneralException);
INLINE char * Base::strdup(const char * s) {
return xstrdup(s);
@@ -98,6 +100,10 @@ INLINE pid_t Base::fork() {
return xfork();
}
+INLINE void Base::exit(int status) {
+ xexit(status);
+}
+
class MemoryException : public GeneralException {
public:
MemoryException(ssize_t);
diff --git a/includes/Image.h b/includes/Image.h
index 09b4cb5..9bef556 100644
--- a/includes/Image.h
+++ b/includes/Image.h
@@ -7,7 +7,7 @@
enum {
FORMAT_TGA_BASIC
-} format_t;
+};
struct Color {
Color(unsigned char aR, unsigned char aG, unsigned char aB, unsigned char aA = 255) :
diff --git a/includes/Input.h b/includes/Input.h
index 1fb48c3..cb1428f 100644
--- a/includes/Input.h
+++ b/includes/Input.h
@@ -15,7 +15,7 @@ class Input : public Handle {
virtual bool CanWrite() const;
virtual bool CanRead() const;
virtual bool CanSeek() const;
- virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException);
virtual String GetName() const;
virtual ssize_t GetSize() const;
virtual time_t GetModif() const;
diff --git a/includes/Output.h b/includes/Output.h
index 3ec5158..eb7b8a6 100644
--- a/includes/Output.h
+++ b/includes/Output.h
@@ -15,7 +15,7 @@ class Output : public Handle {
virtual bool CanWrite() const;
virtual bool CanRead() const;
virtual bool CanSeek() const;
- virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException);
virtual String GetName() const;
protected:
diff --git a/includes/cdreader.h b/includes/cdreader.h
index ed3bc00..1909fe2 100644
--- a/includes/cdreader.h
+++ b/includes/cdreader.h
@@ -16,7 +16,7 @@ class cdreader : public Handle {
virtual bool CanRead() const;
virtual bool CanSeek() const;
virtual ssize_t read(void *buf, size_t count) throw (GeneralException);
- virtual off_t seek(off_t, int) throw (GeneralException);
+ virtual off_t seek(off_t, int = SEEK_SET) throw (GeneralException);
virtual String GetName() const;
virtual ssize_t GetSize() const;
virtual void getsector(void *, int = -1) throw (GeneralException);