diff options
author | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-28 22:02:20 +0000 |
---|---|---|
committer | kitty <kitty@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2002-05-28 22:02:20 +0000 |
commit | 69a90edcab5d6d3d52aa0c1a7a73c3278f01fe2f (patch) | |
tree | 8847b15909f4cbf99c9c3153ba9475a19efe97fc | |
parent | f3d39d685722a798b1b0ed7b8610b634a1892fa5 (diff) | |
download | ATCD-69a90edcab5d6d3d52aa0c1a7a73c3278f01fe2f.tar.gz |
ChangeLogTag: Tue May 28 17:00:21 2002 Krishnakumar B <kitty@cs.wustl.edu>
-rw-r--r-- | ChangeLog | 73 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-02a | 73 | ||||
-rw-r--r-- | ChangeLogs/ChangeLog-03a | 73 | ||||
-rw-r--r-- | ace/Read_Buffer.cpp | 4 | ||||
-rw-r--r-- | docs/ACE-guidelines.html | 6 |
5 files changed, 144 insertions, 85 deletions
diff --git a/ChangeLog b/ChangeLog index e7b33ca6877..44647258fe1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,20 @@ +Tue May 28 17:00:21 2002 Krishnakumar B <kitty@cs.wustl.edu> + + * ace/Read_Buffer.cpp (rec_read): + + Fixed stupid thinko when decrementing slot. Tell myself to think + twice to about using ?:. My previous change also ate the + character when only one character is in a file. ACE_Read_Buffer + is crying for a test under $ACE_ROOT/tests which tests variable + sized buffers with sizes of 1, < BUFSIZ, BUFSIZ, > BUFSIZ + instead of under examples/misc/test_tead_buffer.cpp. Will try to + get in one. + + * docs/ACE-guidelines.html: + + Update guidelines to be careful about using ?: in some + situations. Thanks to Doug for suggesting this. + Tue May 28 21:54:44 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> * bin/nightlybuilds/builds.lst: Move Debian_NoInline and Debian_GCC_3.0.4 @@ -19,7 +36,7 @@ Tue May 28 18:35:46 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> instead of ::wcstok. * ace/OS_String.inl (strtok): If ACE_HAS_XPG4_MULTIBYTE_CHAR is defined, call 3 parameter version of wcstok, else call 2 parameter version. - * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and + * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and ACE_LACKS_WCSDUP_PROTOTYPE for glibc versions less than 2. Define ACE_HAS_XPG4_MULTIBYTE_CHAR for glibc 2 and higher. * tests/OS_Test.cpp: Add test for wchar_t version of strtok. @@ -41,60 +58,60 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * tests/Logging_Strategy_Test.cpp: Fixed typo, ACE_AS_* > ACE_HAS_*. - + * tests/Makefile.Framework_Component_DLL: * tests/Makefile: * tests/Makefile.bor: - Added/modified Makefiles to add new test file, and updated + Added/modified Makefiles to add new test file, and updated dependancies. - + * tests/Framework_Component_Test.{h,cpp}: * tests/Framework_Component_DLL.{h,cpp}: Added. * tests/Framework_Component_DLL_export.h: Added. - Modified to test to exercise the new ACE_DLL_Singleton and + Modified to test to exercise the new ACE_DLL_Singleton and ACE_DLL* classed in concert with the Service Config framework - and new Framework Component mechanisms. + and new Framework Component mechanisms. * tests/DLL_Test.{h,cpp}: Modified test to fully test all the features of the new ACE_DLL, ACE_DLL_Handle, and ACE_DLL_Manager classes. - + * ace/Makefile: - * ace/Makefile.bor: - - Added DLL_Manager and updated dependancies. + * ace/Makefile.bor: + + Added DLL_Manager and updated dependancies. * bin/generate_export_file.pl: Added generation of library specific TRACE macros in terms of the new ACE_TRACE_IMPL macro below. - * ace/Global_Macros.h: + * ace/Global_Macros.h: - Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE + Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE in terms of it if tracing is enabled. This allows you to turn tracing on for a particular cpp by just undef'ing - ACE_TRACE and redefining it as ACE_TRACE_IMPL. - + ACE_TRACE and redefining it as ACE_TRACE_IMPL. + * ace/Parse_Node.{h,cpp}: - Removed handle() method and added a dll() method. Also, - since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, - changed the ACE::ldname() calls in the ctors for + Removed handle() method and added a dll() method. Also, + since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, + changed the ACE::ldname() calls in the ctors for ACE_Object_node and ACE_Function_Node to ACE::strnew(). * ace/Svc_Conf_y.cpp: Changed call to ACE_Location_Node::handle() to ACE_Location_Node::dll() in ACE_Service_Type::ctor. - + * ace/Service_Object.{h,cpp,i}: - Modified ACE_Service_Type to maintain an ACE_DLL member variable - instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. + Modified ACE_Service_Type to maintain an ACE_DLL member variable + instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. Removed call to ACE_OS::dlclose() from dtor. Removed handle() methods. @@ -102,14 +119,14 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * ace/Service_Config.cpp: The Object Manager is now always responsible for cleaning up - the ACE_Framework_Repository, but only after the Service + the ACE_Framework_Repository, but only after the Service Config framework has been cleanup. ACE_Service_Config no longer knows anything about ACE_Framework_Repository. - + * ace/Service_Config.cpp: Changed create_service_type() to take an ACE_DLL& instead of - an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). + an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). * ace/DLL_Manager.{h,cpp}: Added. * ace/DLL.{h,cpp}: @@ -118,23 +135,23 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> and moved all functionalility from ACE_DLL to the new classes. ACE_DLL maintains the same interface and semantics but defers all calls to the new classes. ACE_DLL_Manager is a singleton - that manages the lifetimes of instances of refcounted + that manages the lifetimes of instances of refcounted ACE_DLL_Handle objects that represent the actual dlls. The following unloading strategies are available: per-process/dll, eager/lazy. - Added copy ctor to ACE_DLL so that the get/set_handle() methods + Added copy ctor to ACE_DLL so that the get/set_handle() methods aren't needed--there use in the Service Config framework can complicate orderly destruction of singletons based on ACE_DLL_Singleton. Added call to ACE::ldname() to the symbol() method so that - the caller no longer needs to do it themselves. + the caller no longer needs to do it themselves. * ace/Singleton.{h,cpp,i}: Added new singleton template, ACE_DLL_Singleton, that registers - itself with the ACE_Framework_Repository so that it can be + itself with the ACE_Framework_Repository so that it can be destroyed when the dll with which it is associated is unloaded. @@ -143,7 +160,7 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> Added name() method as needed by changes below, and implemented dll_name() method to return "ACE". - + * ace/Framework_Component.{h,cpp,inl}: * ace/Framework_Component_T.{h,cpp}: diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a index e7b33ca6877..44647258fe1 100644 --- a/ChangeLogs/ChangeLog-02a +++ b/ChangeLogs/ChangeLog-02a @@ -1,3 +1,20 @@ +Tue May 28 17:00:21 2002 Krishnakumar B <kitty@cs.wustl.edu> + + * ace/Read_Buffer.cpp (rec_read): + + Fixed stupid thinko when decrementing slot. Tell myself to think + twice to about using ?:. My previous change also ate the + character when only one character is in a file. ACE_Read_Buffer + is crying for a test under $ACE_ROOT/tests which tests variable + sized buffers with sizes of 1, < BUFSIZ, BUFSIZ, > BUFSIZ + instead of under examples/misc/test_tead_buffer.cpp. Will try to + get in one. + + * docs/ACE-guidelines.html: + + Update guidelines to be careful about using ?: in some + situations. Thanks to Doug for suggesting this. + Tue May 28 21:54:44 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> * bin/nightlybuilds/builds.lst: Move Debian_NoInline and Debian_GCC_3.0.4 @@ -19,7 +36,7 @@ Tue May 28 18:35:46 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> instead of ::wcstok. * ace/OS_String.inl (strtok): If ACE_HAS_XPG4_MULTIBYTE_CHAR is defined, call 3 parameter version of wcstok, else call 2 parameter version. - * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and + * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and ACE_LACKS_WCSDUP_PROTOTYPE for glibc versions less than 2. Define ACE_HAS_XPG4_MULTIBYTE_CHAR for glibc 2 and higher. * tests/OS_Test.cpp: Add test for wchar_t version of strtok. @@ -41,60 +58,60 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * tests/Logging_Strategy_Test.cpp: Fixed typo, ACE_AS_* > ACE_HAS_*. - + * tests/Makefile.Framework_Component_DLL: * tests/Makefile: * tests/Makefile.bor: - Added/modified Makefiles to add new test file, and updated + Added/modified Makefiles to add new test file, and updated dependancies. - + * tests/Framework_Component_Test.{h,cpp}: * tests/Framework_Component_DLL.{h,cpp}: Added. * tests/Framework_Component_DLL_export.h: Added. - Modified to test to exercise the new ACE_DLL_Singleton and + Modified to test to exercise the new ACE_DLL_Singleton and ACE_DLL* classed in concert with the Service Config framework - and new Framework Component mechanisms. + and new Framework Component mechanisms. * tests/DLL_Test.{h,cpp}: Modified test to fully test all the features of the new ACE_DLL, ACE_DLL_Handle, and ACE_DLL_Manager classes. - + * ace/Makefile: - * ace/Makefile.bor: - - Added DLL_Manager and updated dependancies. + * ace/Makefile.bor: + + Added DLL_Manager and updated dependancies. * bin/generate_export_file.pl: Added generation of library specific TRACE macros in terms of the new ACE_TRACE_IMPL macro below. - * ace/Global_Macros.h: + * ace/Global_Macros.h: - Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE + Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE in terms of it if tracing is enabled. This allows you to turn tracing on for a particular cpp by just undef'ing - ACE_TRACE and redefining it as ACE_TRACE_IMPL. - + ACE_TRACE and redefining it as ACE_TRACE_IMPL. + * ace/Parse_Node.{h,cpp}: - Removed handle() method and added a dll() method. Also, - since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, - changed the ACE::ldname() calls in the ctors for + Removed handle() method and added a dll() method. Also, + since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, + changed the ACE::ldname() calls in the ctors for ACE_Object_node and ACE_Function_Node to ACE::strnew(). * ace/Svc_Conf_y.cpp: Changed call to ACE_Location_Node::handle() to ACE_Location_Node::dll() in ACE_Service_Type::ctor. - + * ace/Service_Object.{h,cpp,i}: - Modified ACE_Service_Type to maintain an ACE_DLL member variable - instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. + Modified ACE_Service_Type to maintain an ACE_DLL member variable + instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. Removed call to ACE_OS::dlclose() from dtor. Removed handle() methods. @@ -102,14 +119,14 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * ace/Service_Config.cpp: The Object Manager is now always responsible for cleaning up - the ACE_Framework_Repository, but only after the Service + the ACE_Framework_Repository, but only after the Service Config framework has been cleanup. ACE_Service_Config no longer knows anything about ACE_Framework_Repository. - + * ace/Service_Config.cpp: Changed create_service_type() to take an ACE_DLL& instead of - an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). + an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). * ace/DLL_Manager.{h,cpp}: Added. * ace/DLL.{h,cpp}: @@ -118,23 +135,23 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> and moved all functionalility from ACE_DLL to the new classes. ACE_DLL maintains the same interface and semantics but defers all calls to the new classes. ACE_DLL_Manager is a singleton - that manages the lifetimes of instances of refcounted + that manages the lifetimes of instances of refcounted ACE_DLL_Handle objects that represent the actual dlls. The following unloading strategies are available: per-process/dll, eager/lazy. - Added copy ctor to ACE_DLL so that the get/set_handle() methods + Added copy ctor to ACE_DLL so that the get/set_handle() methods aren't needed--there use in the Service Config framework can complicate orderly destruction of singletons based on ACE_DLL_Singleton. Added call to ACE::ldname() to the symbol() method so that - the caller no longer needs to do it themselves. + the caller no longer needs to do it themselves. * ace/Singleton.{h,cpp,i}: Added new singleton template, ACE_DLL_Singleton, that registers - itself with the ACE_Framework_Repository so that it can be + itself with the ACE_Framework_Repository so that it can be destroyed when the dll with which it is associated is unloaded. @@ -143,7 +160,7 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> Added name() method as needed by changes below, and implemented dll_name() method to return "ACE". - + * ace/Framework_Component.{h,cpp,inl}: * ace/Framework_Component_T.{h,cpp}: diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a index e7b33ca6877..44647258fe1 100644 --- a/ChangeLogs/ChangeLog-03a +++ b/ChangeLogs/ChangeLog-03a @@ -1,3 +1,20 @@ +Tue May 28 17:00:21 2002 Krishnakumar B <kitty@cs.wustl.edu> + + * ace/Read_Buffer.cpp (rec_read): + + Fixed stupid thinko when decrementing slot. Tell myself to think + twice to about using ?:. My previous change also ate the + character when only one character is in a file. ACE_Read_Buffer + is crying for a test under $ACE_ROOT/tests which tests variable + sized buffers with sizes of 1, < BUFSIZ, BUFSIZ, > BUFSIZ + instead of under examples/misc/test_tead_buffer.cpp. Will try to + get in one. + + * docs/ACE-guidelines.html: + + Update guidelines to be careful about using ?: in some + situations. Thanks to Doug for suggesting this. + Tue May 28 21:54:44 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> * bin/nightlybuilds/builds.lst: Move Debian_NoInline and Debian_GCC_3.0.4 @@ -19,7 +36,7 @@ Tue May 28 18:35:46 UTC 2002 Craig Rodrigues <crodrigu@bbn.com> instead of ::wcstok. * ace/OS_String.inl (strtok): If ACE_HAS_XPG4_MULTIBYTE_CHAR is defined, call 3 parameter version of wcstok, else call 2 parameter version. - * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and + * ace/config-linux-common.h: Only define ACE_LACKS_WCSTOK and ACE_LACKS_WCSDUP_PROTOTYPE for glibc versions less than 2. Define ACE_HAS_XPG4_MULTIBYTE_CHAR for glibc 2 and higher. * tests/OS_Test.cpp: Add test for wchar_t version of strtok. @@ -41,60 +58,60 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * tests/Logging_Strategy_Test.cpp: Fixed typo, ACE_AS_* > ACE_HAS_*. - + * tests/Makefile.Framework_Component_DLL: * tests/Makefile: * tests/Makefile.bor: - Added/modified Makefiles to add new test file, and updated + Added/modified Makefiles to add new test file, and updated dependancies. - + * tests/Framework_Component_Test.{h,cpp}: * tests/Framework_Component_DLL.{h,cpp}: Added. * tests/Framework_Component_DLL_export.h: Added. - Modified to test to exercise the new ACE_DLL_Singleton and + Modified to test to exercise the new ACE_DLL_Singleton and ACE_DLL* classed in concert with the Service Config framework - and new Framework Component mechanisms. + and new Framework Component mechanisms. * tests/DLL_Test.{h,cpp}: Modified test to fully test all the features of the new ACE_DLL, ACE_DLL_Handle, and ACE_DLL_Manager classes. - + * ace/Makefile: - * ace/Makefile.bor: - - Added DLL_Manager and updated dependancies. + * ace/Makefile.bor: + + Added DLL_Manager and updated dependancies. * bin/generate_export_file.pl: Added generation of library specific TRACE macros in terms of the new ACE_TRACE_IMPL macro below. - * ace/Global_Macros.h: + * ace/Global_Macros.h: - Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE + Added new macro, ACE_TRACE_IMPL and implemented ACE_TRACE in terms of it if tracing is enabled. This allows you to turn tracing on for a particular cpp by just undef'ing - ACE_TRACE and redefining it as ACE_TRACE_IMPL. - + ACE_TRACE and redefining it as ACE_TRACE_IMPL. + * ace/Parse_Node.{h,cpp}: - Removed handle() method and added a dll() method. Also, - since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, - changed the ACE::ldname() calls in the ctors for + Removed handle() method and added a dll() method. Also, + since ACE_DLL_Handle::symbol() calls ACE::ldname() internally, + changed the ACE::ldname() calls in the ctors for ACE_Object_node and ACE_Function_Node to ACE::strnew(). * ace/Svc_Conf_y.cpp: Changed call to ACE_Location_Node::handle() to ACE_Location_Node::dll() in ACE_Service_Type::ctor. - + * ace/Service_Object.{h,cpp,i}: - Modified ACE_Service_Type to maintain an ACE_DLL member variable - instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. + Modified ACE_Service_Type to maintain an ACE_DLL member variable + instead of an ACE_SHLIB_HANDLE, and changed ctor accordingly. Removed call to ACE_OS::dlclose() from dtor. Removed handle() methods. @@ -102,14 +119,14 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> * ace/Service_Config.cpp: The Object Manager is now always responsible for cleaning up - the ACE_Framework_Repository, but only after the Service + the ACE_Framework_Repository, but only after the Service Config framework has been cleanup. ACE_Service_Config no longer knows anything about ACE_Framework_Repository. - + * ace/Service_Config.cpp: Changed create_service_type() to take an ACE_DLL& instead of - an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). + an ACE_SHLIB_HANDLE. Removed unneeded call to ACE::ldname(). * ace/DLL_Manager.{h,cpp}: Added. * ace/DLL.{h,cpp}: @@ -118,23 +135,23 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> and moved all functionalility from ACE_DLL to the new classes. ACE_DLL maintains the same interface and semantics but defers all calls to the new classes. ACE_DLL_Manager is a singleton - that manages the lifetimes of instances of refcounted + that manages the lifetimes of instances of refcounted ACE_DLL_Handle objects that represent the actual dlls. The following unloading strategies are available: per-process/dll, eager/lazy. - Added copy ctor to ACE_DLL so that the get/set_handle() methods + Added copy ctor to ACE_DLL so that the get/set_handle() methods aren't needed--there use in the Service Config framework can complicate orderly destruction of singletons based on ACE_DLL_Singleton. Added call to ACE::ldname() to the symbol() method so that - the caller no longer needs to do it themselves. + the caller no longer needs to do it themselves. * ace/Singleton.{h,cpp,i}: Added new singleton template, ACE_DLL_Singleton, that registers - itself with the ACE_Framework_Repository so that it can be + itself with the ACE_Framework_Repository so that it can be destroyed when the dll with which it is associated is unloaded. @@ -143,7 +160,7 @@ Tue May 28 10:47:50 UTC 2002 Don Hinton <dhinton@ieee.org> Added name() method as needed by changes below, and implemented dll_name() method to return "ACE". - + * ace/Framework_Component.{h,cpp,inl}: * ace/Framework_Component_T.{h,cpp}: diff --git a/ace/Read_Buffer.cpp b/ace/Read_Buffer.cpp index 16e53f5263a..4305bde362d 100644 --- a/ace/Read_Buffer.cpp +++ b/ace/Read_Buffer.cpp @@ -126,7 +126,9 @@ ACE_Read_Buffer::rec_read (int term, int search, int replace) // Increment the number of bytes. // @@@ Temporary hack. We should solve this by abstracting the end-of-line // conventions and using it throughout ACE - this->size_ += slot == 0 ? 0 : slot - 1; + if (slot > 1) + slot = slot - 1; + this->size_ += slot; // Don't bother going any farther if the total size is 0. if (this->size_ == 0) diff --git a/docs/ACE-guidelines.html b/docs/ACE-guidelines.html index 70b50402bed..cbc173acd7e 100644 --- a/docs/ACE-guidelines.html +++ b/docs/ACE-guidelines.html @@ -451,6 +451,12 @@ The correct way to write that guard is: set.insert (2 * i + 1); </pre><p> + <li>Prefer using <strong> <code> if (...) else .... </code> </strong> + instead of <strong> <code> ?: </code> </strong> operator. It is a lot + less error prone, and will help you avoid bugs caused due to the + precedence of <strong> <code> ?: </code> </strong>, compared with other + operators in an expression. + <li>When a class provides operator==, it must also provide operator!=. Also, both these operators must be const. |