From 4586a1bbbc64a7d213ecdcf3301e8f743c26ad7f Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Nov 2005 19:22:02 +0000 Subject: [PATCH] *** empty log message *** --- src/callback.h | 161 ++++++++++++++++++++++++------------------------- src/iom.C | 11 ++-- src/iom.h | 11 +++- 3 files changed, 93 insertions(+), 90 deletions(-) diff --git a/src/callback.h b/src/callback.h index fe1bfff7..168bfbbb 100644 --- a/src/callback.h +++ b/src/callback.h @@ -1,15 +1,14 @@ -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it -// THIS IS A GENERATED FILE, RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: RUN callback.pl to regenerate it +// THIS IS A GENERATED FILE: callback.pl is part of the GVPE +// THIS IS A GENERATED FILE: distribution. /* callback.h -- C++ callback mechanism - Copyright (C) 2003 Marc Lehmann + Copyright (C) 2003-2005 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -20,7 +19,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -32,17 +31,17 @@ class callback0 { struct object { }; void *obj; - R (object::*meth) (); + R (object::*meth)(); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) ()) = 0; + virtual R call (void *obj, R (object::*meth)()) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) ()) + virtual R call (void *obj, R (object::*meth)()) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (); } }; @@ -51,20 +50,20 @@ class callback0 { public: template - callback0 (O1 *object, R (O2::*method) ()) + callback0 (O1 *object, R (O2::*method)()) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call () const + R call() const { return prxy->call (obj, meth); } - R operator () () const + R operator ()() const { return call (); } @@ -75,17 +74,17 @@ class callback1 { struct object { }; void *obj; - R (object::*meth) (A1); + R (object::*meth)(A1); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1), A1 a1) = 0; + virtual R call (void *obj, R (object::*meth)(A1), A1 a1) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1), A1 a1) + virtual R call (void *obj, R (object::*meth)(A1), A1 a1) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1); } }; @@ -94,20 +93,20 @@ class callback1 { public: template - callback1 (O1 *object, R (O2::*method) (A1)) + callback1 (O1 *object, R (O2::*method)(A1)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1) const + R call(A1 a1) const { return prxy->call (obj, meth, a1); } - R operator () (A1 a1) const + R operator ()(A1 a1) const { return call (a1); } @@ -118,17 +117,17 @@ class callback2 { struct object { }; void *obj; - R (object::*meth) (A1, A2); + R (object::*meth)(A1, A2); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2), A1 a1, A2 a2) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2), A1 a1, A2 a2) + virtual R call (void *obj, R (object::*meth)(A1, A2), A1 a1, A2 a2) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2); } }; @@ -137,20 +136,20 @@ class callback2 { public: template - callback2 (O1 *object, R (O2::*method) (A1, A2)) + callback2 (O1 *object, R (O2::*method)(A1, A2)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2) const + R call(A1 a1, A2 a2) const { return prxy->call (obj, meth, a1, a2); } - R operator () (A1 a1, A2 a2) const + R operator ()(A1 a1, A2 a2) const { return call (a1, a2); } @@ -161,17 +160,17 @@ class callback3 { struct object { }; void *obj; - R (object::*meth) (A1, A2, A3); + R (object::*meth)(A1, A2, A3); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3), A1 a1, A2 a2, A3 a3) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3), A1 a1, A2 a2, A3 a3) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3); } }; @@ -180,20 +179,20 @@ class callback3 { public: template - callback3 (O1 *object, R (O2::*method) (A1, A2, A3)) + callback3 (O1 *object, R (O2::*method)(A1, A2, A3)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3) const + R call(A1 a1, A2 a2, A3 a3) const { return prxy->call (obj, meth, a1, a2, a3); } - R operator () (A1 a1, A2 a2, A3 a3) const + R operator ()(A1 a1, A2 a2, A3 a3) const { return call (a1, a2, a3); } @@ -204,17 +203,17 @@ class callback4 { struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4); + R (object::*meth)(A1, A2, A3, A4); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4), A1 a1, A2 a2, A3 a3, A4 a4) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4); } }; @@ -223,20 +222,20 @@ class callback4 { public: template - callback4 (O1 *object, R (O2::*method) (A1, A2, A3, A4)) + callback4 (O1 *object, R (O2::*method)(A1, A2, A3, A4)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4) const + R call(A1 a1, A2 a2, A3 a3, A4 a4) const { return prxy->call (obj, meth, a1, a2, a3, a4); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4) const { return call (a1, a2, a3, a4); } @@ -247,17 +246,17 @@ class callback5 { struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5); + R (object::*meth)(A1, A2, A3, A4, A5); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5); } }; @@ -266,20 +265,20 @@ class callback5 { public: template - callback5 (O1 *object, R (O2::*method) (A1, A2, A3, A4, A5)) + callback5 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5) const { return call (a1, a2, a3, a4, a5); } @@ -290,17 +289,17 @@ class callback6 { struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5, A6); + R (object::*meth)(A1, A2, A3, A4, A5, A6); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5, a6); } }; @@ -309,20 +308,20 @@ class callback6 { public: template - callback6 (O1 *object, R (O2::*method) (A1, A2, A3, A4, A5, A6)) + callback6 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6) const { return call (a1, a2, a3, a4, a5, a6); } @@ -333,17 +332,17 @@ class callback7 { struct object { }; void *obj; - R (object::*meth) (A1, A2, A3, A4, A5, A6, A7); + R (object::*meth)(A1, A2, A3, A4, A5, A6, A7); /* a proxy is a kind of recipe on how to call a specific class method */ struct proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) = 0; + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) = 0; }; template struct proxy : proxy_base { - virtual R call (void *obj, R (object::*meth) (A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) + virtual R call (void *obj, R (object::*meth)(A1, A2, A3, A4, A5, A6, A7), A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) { - ((reinterpret_cast (obj)) ->* (reinterpret_cast (meth))) + ((reinterpret_cast(obj)) ->* (reinterpret_cast(meth))) (a1, a2, a3, a4, a5, a6, a7); } }; @@ -352,20 +351,20 @@ class callback7 { public: template - callback7 (O1 *object, R (O2::*method) (A1, A2, A3, A4, A5, A6, A7)) + callback7 (O1 *object, R (O2::*method)(A1, A2, A3, A4, A5, A6, A7)) { static proxy p; - obj = reinterpret_cast (object); - meth = reinterpret_cast (method); + obj = reinterpret_cast(object); + meth = reinterpret_cast(method); prxy = &p; } - R call (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + R call(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { return prxy->call (obj, meth, a1, a2, a3, a4, a5, a6, a7); } - R operator () (A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const + R operator ()(A1 a1, A2 a2, A3 a3, A4 a4, A5 a5, A6 a6, A7 a7) const { return call (a1, a2, a3, a4, a5, a6, a7); } diff --git a/src/iom.C b/src/iom.C index 6f8e6546..df08a84d 100644 --- a/src/iom.C +++ b/src/iom.C @@ -1,8 +1,10 @@ /* iom.C -- generic I/O multiplexer - Copyright (C) 2003, 2004 Marc Lehmann + Copyright (C) 2003, 2004 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -13,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -43,9 +45,6 @@ // until that happens, sys/select.h must come last #include -// TSTAMP_MAX must still fit into a positive struct timeval -#define TSTAMP_MAX (double)(1UL<<31) - #define TIMEVAL timeval #define TV_FRAC tv_usec #define TV_MULT 1000000L diff --git a/src/iom.h b/src/iom.h index 5b133a65..84409f30 100644 --- a/src/iom.h +++ b/src/iom.h @@ -1,8 +1,10 @@ /* iom.h -- generic I/O multiplexer - Copyright (C) 2003, 2004 Marc Lehmann + Copyright (C) 2003, 2004 Marc Lehmann - This program is free software; you can redistribute it and/or modify + This file is part of GVPE. + + GVPE is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. @@ -13,7 +15,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software + along with gvpe; if not, write to the Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ @@ -47,6 +49,9 @@ typedef double tstamp; extern tstamp NOW; +// TSTAMP_MAX must still fit into a positive struct timeval +#define TSTAMP_MAX (double)(1UL<<31) + struct watcher; #if IOM_IO struct io_watcher; -- 2.34.1