From b85d9d0fc9672612e8665dcadcdcdf44f786451b Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 31 Jan 2003 07:55:44 +0000 Subject: compiling on gcc-3.2.2 --- include/BString.h | 8 +++++++- include/Exceptions.h | 4 +++- 2 files changed, 10 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/BString.h b/include/BString.h index 948534e..a0aa10b 100644 --- a/include/BString.h +++ b/include/BString.h @@ -3,9 +3,14 @@ #include #include +#include #include #include +struct ugly_string { + char * p; +}; + class String : public Base { public: String(const String &); @@ -21,7 +26,7 @@ class String : public Base { String(double); ~String(); const char * set(const char *, ...); - const char * set(const String &, ...); + const char * set(const ugly_string &, ...); const char * to_charp(size_t = 0, ssize_t = -1) const; String extract(size_t = 0, ssize_t = -1) const; char * strdup(size_t = 0, ssize_t = -1) const; @@ -51,6 +56,7 @@ class String : public Base { bool operator<(const String &) const; bool operator>(const String &) const; char operator[](size_t i) const; + operator ugly_string() const; String & toupper(); String & tolower(); diff --git a/include/Exceptions.h b/include/Exceptions.h index c66f7d5..b7885cc 100644 --- a/include/Exceptions.h +++ b/include/Exceptions.h @@ -12,6 +12,7 @@ typedef int pid_t; #endif class String; +struct ugly_string; class Base { public: @@ -28,7 +29,8 @@ class Base { static int pipe(int * p, int flag = 0); static pid_t fork(); static void exit(int); - static void printm(int level, String fmt, ...); + static void printm(int level, const ugly_string &, ...); + static void printm(int level, const char *, ...); }; class String; -- cgit v1.2.3