From 53de7397c5d9cfcbf480f122a379f077345f8ba8 Mon Sep 17 00:00:00 2001 From: Pixel Date: Thu, 10 Jan 2002 14:15:35 +0000 Subject: Better duplicating handling... --- include/Buffer.h | 1 + include/Exceptions.h | 3 ++- include/InPipe.h | 1 + include/Input.h | 1 + include/OutPipe.h | 1 + include/Output.h | 1 + 6 files changed, 7 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/Buffer.h b/include/Buffer.h index 53a3131..360abad 100644 --- a/include/Buffer.h +++ b/include/Buffer.h @@ -13,6 +13,7 @@ class Buffer : public Handle { public: Buffer(); + Buffer(const Buffer &); virtual ~Buffer(); virtual ssize_t write(const void *buf, size_t count); virtual ssize_t read(void *buf, size_t count) throw (GeneralException); diff --git a/include/Exceptions.h b/include/Exceptions.h index e5d24e6..1b98598 100644 --- a/include/Exceptions.h +++ b/include/Exceptions.h @@ -13,6 +13,7 @@ class GeneralException; char * xstrdup(const char *); void * xmalloc(size_t) throw (GeneralException); void xfree(void *&); +void xfree(char *&); void * xrealloc(void *, size_t); int xpipe(int *, int = 0) throw (GeneralException); pid_t xfork() throw (GeneralException); @@ -46,7 +47,7 @@ class Base { xfree(p); } static void free(char *& p) { - xfree((void *) p); + xfree(p); } static int pipe(int * p, int flag = 0) { return xpipe(p, flag); diff --git a/include/InPipe.h b/include/InPipe.h index 251523d..fa14868 100644 --- a/include/InPipe.h +++ b/include/InPipe.h @@ -7,6 +7,7 @@ class InPipe : public Handle { public: InPipe(); + InPipe(const InPipe &); virtual ~InPipe(); void Hook(); virtual bool CanWrite(); diff --git a/include/Input.h b/include/Input.h index 87190f1..7091258 100644 --- a/include/Input.h +++ b/include/Input.h @@ -10,6 +10,7 @@ class Input : public Handle { public: Input(String = "") throw (GeneralException); + Input(const Input &); virtual ~Input() {} virtual bool CanWrite(); virtual bool CanRead(); diff --git a/include/OutPipe.h b/include/OutPipe.h index 9861d6d..4a9befe 100644 --- a/include/OutPipe.h +++ b/include/OutPipe.h @@ -7,6 +7,7 @@ class OutPipe : public Handle { public: OutPipe(); + OutPipe(const OutPipe &); virtual ~OutPipe(); void Hook(); virtual bool CanWrite(); diff --git a/include/Output.h b/include/Output.h index 6c4fdec..32d4e66 100644 --- a/include/Output.h +++ b/include/Output.h @@ -8,6 +8,7 @@ class Output : public Handle { public: Output(String = "", int trunc = 1) throw (GeneralException); + Output(const Output &); virtual ~Output() {} virtual bool CanWrite(); virtual bool CanRead(); -- cgit v1.2.3