diff options
-rw-r--r-- | ChangeLog-99b | 5 | ||||
-rw-r--r-- | ace/Containers_T.cpp | 16 | ||||
-rw-r--r-- | ace/Containers_T.h | 5 | ||||
-rw-r--r-- | examples/ASX/Event_Server/Transceiver/transceiver.h | 4 | ||||
-rw-r--r-- | examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp | 2 | ||||
-rw-r--r-- | netsvcs/clients/Tokens/manual/manual.cpp | 15 | ||||
-rw-r--r-- | netsvcs/lib/Base_Optimizer.h | 12 | ||||
-rw-r--r-- | netsvcs/lib/Client_Logging_Handler.h | 5 | ||||
-rw-r--r-- | netsvcs/lib/Log_Message_Receiver.h | 42 | ||||
-rw-r--r-- | netsvcs/lib/Logging_Strategy.h | 11 | ||||
-rw-r--r-- | netsvcs/lib/Name_Handler.h | 13 | ||||
-rw-r--r-- | netsvcs/lib/Server_Logging_Handler_T.h | 14 | ||||
-rw-r--r-- | netsvcs/lib/TS_Clerk_Handler.h | 34 | ||||
-rw-r--r-- | netsvcs/lib/TS_Server_Handler.h | 6 | ||||
-rw-r--r-- | netsvcs/lib/Token_Handler.h | 14 | ||||
-rw-r--r-- | tests/DLList_Test.cpp | 30 |
16 files changed, 134 insertions, 94 deletions
diff --git a/ChangeLog-99b b/ChangeLog-99b index d98aa5bec34..726fd50ca56 100644 --- a/ChangeLog-99b +++ b/ChangeLog-99b @@ -1,3 +1,8 @@ +Mon Jun 7 00:11:00 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> + + * netsvcs/lib: Reformatted all the *.h files to conform to the ACE + programming guidelines. + Sun Jun 6 22:02:43 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu> * ace/OS.i (t_error): Fixed the broken t_error() usage on SunOS diff --git a/ace/Containers_T.cpp b/ace/Containers_T.cpp index b7c274a8229..15d6dda2c4b 100644 --- a/ace/Containers_T.cpp +++ b/ace/Containers_T.cpp @@ -826,8 +826,10 @@ ACE_Double_Linked_List<T>::delete_head (void) if (this->is_empty ()) return 0; - temp = ACE_static_cast (T *, this->head_->next_); - this->remove_element (temp); // Detach it from the list. + temp = ACE_static_cast (T *, + this->head_->next_); + // Detach it from the list. + this->remove_element (temp); return temp; } @@ -839,8 +841,10 @@ ACE_Double_Linked_List<T>::delete_tail (void) if (this->is_empty ()) return 0; - temp = ACE_static_cast (T*, this->head_->prev_); - this->remove_element (temp); // Detach it from the list. + temp = ACE_static_cast (T *, + this->head_->prev_); + // Detach it from the list. + this->remove_element (temp); return temp; } @@ -946,7 +950,8 @@ ACE_Double_Linked_List<T>::insert_element (T *new_item, old_item = this->head_; if (before) - old_item = ACE_static_cast (T*, old_item->prev_); + old_item = ACE_static_cast (T *, + old_item->prev_); new_item->next_ = old_item->next_; new_item->next_->prev_ = new_item; @@ -2218,7 +2223,6 @@ ACE_Ordered_MultiSet_Iterator<T>::next (T *&item) const return 0; } - ACE_ALLOC_HOOK_DEFINE (ACE_DLList_Node) template <class T> T * diff --git a/ace/Containers_T.h b/ace/Containers_T.h index 951871f58f1..f03482c4daa 100644 --- a/ace/Containers_T.h +++ b/ace/Containers_T.h @@ -23,7 +23,8 @@ # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ -#include "ace/Containers.h" /* Need ACE_DLList_Node */ +// Need by ACE_DLList_Node. +#include "ace/Containers.h" class ACE_Allocator; @@ -735,7 +736,7 @@ public: T *insert_head (T *new_item); // Delegates to ACE_Double_Linked_List. - T* delete_head (void); + T *delete_head (void); // Delegates to ACE_Double_Linked_List. T *delete_tail (void); diff --git a/examples/ASX/Event_Server/Transceiver/transceiver.h b/examples/ASX/Event_Server/Transceiver/transceiver.h index 3f89f37b3de..28bde9bfb07 100644 --- a/examples/ASX/Event_Server/Transceiver/transceiver.h +++ b/examples/ASX/Event_Server/Transceiver/transceiver.h @@ -51,10 +51,10 @@ private: u_short port_number_; // Port number of event server. - char *host_name_; + const char *host_name_; // Name of event server. - char *role_; + const char *role_; // Are we playing the Consumer or Supplier role? }; diff --git a/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp b/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp index 8acac06b97b..11f9e94ddb6 100644 --- a/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp +++ b/examples/ASX/UPIPE_Event_Server/Supplier_Router.cpp @@ -59,7 +59,7 @@ Supplier_Router::open (void *) char *argv[3]; argv[0] = (char *) this->name (); - argv[1] = options.supplier_file (); + argv[1] = (char *) options.supplier_file (); argv[2] = 0; if (this->init (1, &argv[1]) == -1) diff --git a/netsvcs/clients/Tokens/manual/manual.cpp b/netsvcs/clients/Tokens/manual/manual.cpp index 79b200e578f..c8435a9d461 100644 --- a/netsvcs/clients/Tokens/manual/manual.cpp +++ b/netsvcs/clients/Tokens/manual/manual.cpp @@ -80,7 +80,7 @@ private: COLLECTIONS collections_; // A collection for each <tid>. - char *server_host_; + const char *server_host_; int server_port_; int ignore_deadlock_; int debug_; @@ -88,11 +88,11 @@ private: }; STDIN_Token::STDIN_Token (void) -: server_host_ (ACE_DEFAULT_SERVER_HOST), - server_port_ (ACE_DEFAULT_SERVER_PORT), - ignore_deadlock_ (0), - debug_ (0), - remote_ (0) + : server_host_ (ACE_DEFAULT_SERVER_HOST), + server_port_ (ACE_DEFAULT_SERVER_PORT), + ignore_deadlock_ (0), + debug_ (0), + remote_ (0) { } @@ -134,7 +134,8 @@ STDIN_Token::parse_args (int argc, char *argv[]) } if (remote_) - ACE_Remote_Mutex::set_server_address (ACE_INET_Addr (server_port_, server_host_)); + ACE_Remote_Mutex::set_server_address (ACE_INET_Addr (server_port_, + server_host_)); return 0; } diff --git a/netsvcs/lib/Base_Optimizer.h b/netsvcs/lib/Base_Optimizer.h index 48cb5059eb8..72b83e9f456 100644 --- a/netsvcs/lib/Base_Optimizer.h +++ b/netsvcs/lib/Base_Optimizer.h @@ -24,15 +24,19 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ template<class Base, class Member> -struct Base_Optimizer : public Base +class Base_Optimizer : public Base +{ // = TITLE // // = DESCRIPTION - // Thanks to Nathan Myers and Fergus Henderson for this little beauty -{ + // Thanks to Nathan Myers and Fergus Henderson for this little + // beauty. + +public: Base_Optimizer (void); Base_Optimizer (const Base &base); - Base_Optimizer (const Base &base, const Member &member); + Base_Optimizer (const Base &base, + const Member &member); Member m_; }; diff --git a/netsvcs/lib/Client_Logging_Handler.h b/netsvcs/lib/Client_Logging_Handler.h index 5cf6b2573c3..b57f974c2ca 100644 --- a/netsvcs/lib/Client_Logging_Handler.h +++ b/netsvcs/lib/Client_Logging_Handler.h @@ -10,7 +10,7 @@ // Client_Logging_Handler.h // // = AUTHOR -// Doug Schmidt +// Doug Schmidt <schmidt@.cs.wustl.edu> // // ============================================================================ @@ -38,6 +38,7 @@ #endif /* ACE_HAS_STREAM_PIPES */ class ACE_Svc_Export ACE_Client_Logging_Handler : public ACE_Svc_Handler<LOGGING_STREAM, ACE_NULL_SYNCH> +{ // = TITLE // This client logging daemon is a mediator that receives logging // records from local applications processes and forwards them to @@ -49,7 +50,7 @@ class ACE_Svc_Export ACE_Client_Logging_Handler : public ACE_Svc_Handler<LOGGING // <ACE_SOCK_Stream> to forward the logging message to the // server. However, on platforms that don't support // <ACE_SPIPEs> (e.g., Win32) we use sockets instead. -{ + public: // = Initialization and termination. diff --git a/netsvcs/lib/Log_Message_Receiver.h b/netsvcs/lib/Log_Message_Receiver.h index 8a182dd873f..784fe07cec7 100644 --- a/netsvcs/lib/Log_Message_Receiver.h +++ b/netsvcs/lib/Log_Message_Receiver.h @@ -86,15 +86,17 @@ // Type based log message receiver template<ACE_SYNCH_DECL> class Static_Log_Message_Receiver +{ // = TITLE // Static_Log_Message_Receiver is a simple log message receiver. It - // has no instance data and only static member functions. Static/typed - // based receivers are best when all LMR should do exactly the same thing. + // has no instance data and only static member + // functions. Static/typed based receivers are best when all LMR + // should do exactly the same thing. // // = DESCRIPTION // This class contains a static log_record member function that // prints the content of log_records on stderr. -{ + public: static void log_record(const char *hostname, ACE_Log_Record &record); @@ -123,27 +125,28 @@ template<ACE_SYNCH_DECL> class Log_Message_Receiver_Impl; template<ACE_SYNCH_DECL> class Log_Message_Receiver +{ // = TITLE - // Log_Message_Receiver is a little more complicated log message receiver. - // It is instance based and have a reference counted implementation. - // Log_Message_Receiver is the envelope class for Log_Message_Receiver_Impl. - // The difference between Static_Log_Message_Receiver and - // Log_Message_Receiver is that is possible to have instance data - // in Log_Message_Receiver. + // Log_Message_Receiver is a little more complicated log message + // receiver. It is instance based and have a reference counted + // implementation. Log_Message_Receiver is the envelope class for + // Log_Message_Receiver_Impl. The difference between + // Static_Log_Message_Receiver and Log_Message_Receiver is that is + // possible to have instance data in Log_Message_Receiver. // // Comment: + // // The practical usage of this is limited with the current - // ACE_Server_Logging_Acceptor_T design. Since ACE_Server_Logging_Acceptor_T - // will create the Log_Message_Receiver using the default constructor. - // The main reason for inclusion right now is to ensure that the - // code in ACE_Server_Logging_Handler_T works both with type and instance + // ACE_Server_Logging_Acceptor_T design. Since + // ACE_Server_Logging_Acceptor_T will create the + // Log_Message_Receiver using the default constructor. The main + // reason for inclusion right now is to ensure that the code in + // ACE_Server_Logging_Handler_T works both with type and instance // based LMRs. // - // // = DESCRIPTION - // This class contains a log_record member function that - // prints the content of log_records on stderr. -{ + // This class contains a log_record member function that prints the + // content of log_records on stderr. public: Log_Message_Receiver (void); // Creates a new Log_Message_Receiver @@ -163,11 +166,12 @@ private: Log_Message_Receiver_Impl<ACE_SYNCH_USE> *receiver_impl_; }; -// Implementation with reference count. - template<ACE_SYNCH_DECL> class Log_Message_Receiver_Impl { + // = TITLE + // Implementation with reference count. + friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning public: // Methods for handling reference count and instance lifetime diff --git a/netsvcs/lib/Logging_Strategy.h b/netsvcs/lib/Logging_Strategy.h index 0ac66225275..d8c86df8c3d 100644 --- a/netsvcs/lib/Logging_Strategy.h +++ b/netsvcs/lib/Logging_Strategy.h @@ -10,7 +10,7 @@ // Logging_Strategy.h // // = AUTHOR -// Prashant Jain +// Prashant Jain <pjain@cs.wustl.edu> // // ============================================================================ @@ -24,6 +24,7 @@ #endif /* ACE_LACKS_PRAGMA_ONCE */ class ACE_Logging_Strategy : public ACE_Service_Object +{ // = TITLE // This class provides the hooks to control the output produced // by any of the network services. @@ -33,18 +34,22 @@ class ACE_Logging_Strategy : public ACE_Service_Object // flags, the output of other network services can be // controlled. The output can be streamed to stderr, to a file, // to a logging daemon, or it can be set to be "silent". -{ public: virtual int init (int argc, char *argv[]); // Dynamic linking hook. int parse_args (int argc, char *argv[]); // Parse svc.conf arguments. + private: void tokenize (char *flag_string); // Tokenize to set all the flags + u_long flags_; - char *filename_; + // Flags we keep track of. + + const char *filename_; + // File name we're logging to. }; ACE_SVC_FACTORY_DECLARE (ACE_Logging_Strategy) diff --git a/netsvcs/lib/Name_Handler.h b/netsvcs/lib/Name_Handler.h index 600e66075c8..e1ec4b9ee5b 100644 --- a/netsvcs/lib/Name_Handler.h +++ b/netsvcs/lib/Name_Handler.h @@ -29,10 +29,13 @@ #include "ace/Name_Request_Reply.h" #include "ace/Singleton.h" -// This helper class adds the correct default constructor to the -// ACE_Naming_Context class so that we can use it in ACE_Singleton. class Naming_Context : public ACE_Naming_Context { + // = TITLE + // + // This helper class adds the correct default constructor to the + // <ACE_Naming_Context> class so that we can use it in + // <ACE_Singleton>. public: Naming_Context (void) : ACE_Naming_Context (ACE_Naming_Context::NET_LOCAL) {} @@ -40,8 +43,8 @@ public: typedef ACE_Singleton<Naming_Context, ACE_SYNCH_NULL_MUTEX> NAMING_CONTEXT; - class ACE_Svc_Export ACE_Name_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ // = TITLE // Product object created by <ACE_Name_Acceptor>. An // <ACE_Name_Handler> exchanges messages with a <ACE_Name_Proxy> @@ -53,7 +56,7 @@ class ACE_Svc_Export ACE_Name_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, // names. It also schedules and handles timeouts that are used to // support "timed waits." Clients used timed waits to bound the // amount of time they block trying to get a name. -{ + friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning public: typedef int (ACE_Name_Handler::*OPERATION) (void); @@ -181,10 +184,10 @@ private: }; class ACE_Name_Acceptor : public ACE_Strategy_Acceptor<ACE_Name_Handler, ACE_SOCK_ACCEPTOR> +{ // = TITLE // This class contains the service-specific methods that can't // easily be factored into the <ACE_Strategy_Acceptor>. -{ public: virtual int init (int argc, char *argv[]); // Dynamic linking hook. diff --git a/netsvcs/lib/Server_Logging_Handler_T.h b/netsvcs/lib/Server_Logging_Handler_T.h index 9c0797f225e..11aee1a33fc 100644 --- a/netsvcs/lib/Server_Logging_Handler_T.h +++ b/netsvcs/lib/Server_Logging_Handler_T.h @@ -92,6 +92,7 @@ protected: template<class SERVER_LOGGING_HANDLER, class LOG_MESSAGE_RECEIVER, class SCHEDULE_STRATEGY> class ACE_Server_Logging_Acceptor_T : public ACE_Strategy_Acceptor<SERVER_LOGGING_HANDLER, LOGGING_PEER_ACCEPTOR> +{ // = TITLE // Factory that creates <SERVER_LOGGING_HANDLER>s scheduled with // <SCHEDULE_STRATEGY> and logging records proccessed by a @@ -100,7 +101,6 @@ class ACE_Server_Logging_Acceptor_T : public ACE_Strategy_Acceptor<SERVER_LOGGIN // = DESCRIPTION // This class contains the service-specific methods that can't // easily be factored into the <ACE_Strategy_Acceptor>. -{ public: ACE_Server_Logging_Acceptor_T (void); virtual int init (int argc, char *argv[]); @@ -145,6 +145,7 @@ private: template<class LOG_MESSAGE_RECEIVER> class ACE_Server_Logging_Handler : public ACE_Server_Logging_Handler_T<LOGGING_PEER_STREAM, u_long, ACE_NULL_SYNCH, LOG_MESSAGE_RECEIVER> +{ // = TITLE // Product object created by a // <ACE_Server_Logging_Acceptor_T<ACE_Server_Logging_Handler> >. An @@ -153,7 +154,7 @@ class ACE_Server_Logging_Handler : public ACE_Server_Logging_Handler_T<LOGGING_P // // = DESCRIPTION // All clients are handled in the same thread. -{ + public: ACE_Server_Logging_Handler (ACE_Thread_Manager * = 0); ACE_Server_Logging_Handler (ACE_Thread_Manager *, @@ -172,15 +173,16 @@ typedef u_long ACE_LOGGER_COUNTER; template<class LOG_MESSAGE_RECEIVER> class ACE_Thr_Server_Logging_Handler : public ACE_Server_Logging_Handler_T<LOGGING_PEER_STREAM, ACE_LOGGER_COUNTER, ACE_LOGGER_SYNCH, LOG_MESSAGE_RECEIVER> +{ // = TITLE // Product object created by a - // <ACE_Server_Logging_Acceptor_T<ACE_Thr_Server_Logging_Handler> >. An - // <ACE_Thr_Server_Logging_Handler> receives, frames. The logging record is then processed by the - // <LOG_MESSAGE_RECEIVER> + // <ACE_Server_Logging_Acceptor_T<ACE_Thr_Server_Logging_Handler> + // >. An <ACE_Thr_Server_Logging_Handler> receives, frames. The + // logging record is then processed by the <LOG_MESSAGE_RECEIVER> // // = DESCRIPTION // Each client is handled in its own separate thread. -{ + public: ACE_Thr_Server_Logging_Handler (ACE_Thread_Manager * = 0); ACE_Thr_Server_Logging_Handler (ACE_Thread_Manager *, diff --git a/netsvcs/lib/TS_Clerk_Handler.h b/netsvcs/lib/TS_Clerk_Handler.h index 617206f6d6c..0a39709d7c9 100644 --- a/netsvcs/lib/TS_Clerk_Handler.h +++ b/netsvcs/lib/TS_Clerk_Handler.h @@ -27,16 +27,21 @@ #include "ace/Malloc.h" #include "ace/Time_Request_Reply.h" -// A simple struct containing delta time and a sequence number -struct ACE_Time_Info +class ACE_Time_Info { + // = TITLE + // A simple struct containing delta time and a sequence number. + +public: long delta_time_; + ACE_UINT32 sequence_num_; }; class ACE_TS_Clerk_Processor; // forward declaration class ACE_Svc_Export ACE_TS_Clerk_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ // = TITLE // The Clerk Handler provides the interface that is used by the // Clerk Processor to send time update requests to all the @@ -49,8 +54,8 @@ class ACE_Svc_Export ACE_TS_Clerk_Handler : public ACE_Svc_Handler<ACE_SOCK_STRE // the round trip delay for the reply to come back. Once it gets // the reply back from the server (handle_input), it adjusts the // system time using the round trip delay estimate and then - // passes the delta time by reference back to the Clerk Processor. -{ + // passes the delta time by reference back to the Clerk + // Processor. public: ACE_TS_Clerk_Handler (ACE_TS_Clerk_Processor *processor = 0, ACE_INET_Addr &addr = (ACE_INET_Addr &) ACE_Addr::sap_any); @@ -100,20 +105,25 @@ public: ACE_INET_Addr &remote_addr (void); // Get/Set remote addr - int send_request (ACE_UINT32 sequence_num, ACE_Time_Info &time_info); + int send_request (ACE_UINT32 sequence_num, + ACE_Time_Info &time_info); // Send request for time update to the server as well as return the // current time info by reference. protected: - virtual int handle_signal (int signum, siginfo_t *, ucontext_t *); + virtual int handle_signal (int signum, + siginfo_t *, + ucontext_t *); // Handle SIGPIPE. static void stderr_output (int = 0); enum { - MAX_RETRY_TIMEOUT = 300 // 5 minutes is the maximum timeout. + MAX_RETRY_TIMEOUT = 300 + // 5 minutes is the maximum timeout. }; + private: int recv_reply (ACE_Time_Request &reply); // Receive a reply from a server containing time update @@ -148,16 +158,17 @@ private: }; class ACE_TS_Clerk_Processor : public ACE_Connector <ACE_TS_Clerk_Handler, ACE_SOCK_CONNECTOR> +{ // = TITLE // This class manages all the connections to the servers along // with querying them periodically for time updates. + // // = DESCRIPTION // The Clerk Processor creates connections to all the servers and // creates an ACE_TS_Clerk_Handler for each connection to handle // the requests and replies. It periodically sends a request for - // time update through each of the handlers and uses the replies for - // computing a synchronized system time. -{ + // time update through each of the handlers and uses the replies + // for computing a synchronized system time. public: ACE_TS_Clerk_Processor (void); // Default constructor @@ -166,7 +177,8 @@ public: const void *arg); // Query servers for time periodically (timeout value) - int initiate_connection (ACE_TS_Clerk_Handler *, ACE_Synch_Options &); + int initiate_connection (ACE_TS_Clerk_Handler *, + ACE_Synch_Options &); // Set up connections to all servers protected: diff --git a/netsvcs/lib/TS_Server_Handler.h b/netsvcs/lib/TS_Server_Handler.h index c4bae7e32f7..7cef0b7b131 100644 --- a/netsvcs/lib/TS_Server_Handler.h +++ b/netsvcs/lib/TS_Server_Handler.h @@ -27,11 +27,12 @@ #include "ace/Time_Request_Reply.h" class ACE_Svc_Export ACE_TS_Server_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ // = TITLE // Product object created by <ACE_TS_Server_Acceptor>. // // = DESCRIPTION -{ + friend class ACE_Shutup_GPlusPlus; // Turn off g++ warning public: // = Initialization and termination. @@ -87,10 +88,11 @@ private: }; class ACE_TS_Server_Acceptor : public ACE_Strategy_Acceptor<ACE_TS_Server_Handler, ACE_SOCK_ACCEPTOR> +{ // = TITLE // This class contains the service-specific methods that can't // easily be factored into the <ACE_Strategy_Acceptor>. -{ + public: virtual int init (int argc, char *argv[]); // Dynamic linking hook. diff --git a/netsvcs/lib/Token_Handler.h b/netsvcs/lib/Token_Handler.h index 5649086e510..9a6234c4325 100644 --- a/netsvcs/lib/Token_Handler.h +++ b/netsvcs/lib/Token_Handler.h @@ -30,6 +30,7 @@ #include "ace/Token_Request_Reply.h" class ACE_Svc_Export ACE_Token_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> +{ // = TITLE // Product object created by an <ACE_Token_Acceptor>. A // <Token_Handler> exchanges messages with a <Token_Proxy> object @@ -43,7 +44,7 @@ class ACE_Svc_Export ACE_Token_Handler : public ACE_Svc_Handler<ACE_SOCK_STREAM, // schedules and handles timeouts that are used to support "timed // waits." Clients used timed waits to bound the amount of time // they block trying to get a token. -{ + public: // = Initialization and termination. @@ -147,9 +148,10 @@ private: // the definition to the .cpp file. class ACE_TS_Mutex : public ACE_Local_Mutex +{ // = TITLE // ACE_TS_Mutex -- ACE_*T*oken_*S*erver_Mutex -{ + public: ACE_TS_Mutex (const char *name, ACE_Token_Handler *th); @@ -177,9 +179,9 @@ private: }; class ACE_TS_RLock : public ACE_Local_RLock +{ // = TITLE // ACE_TS_RLock -- ACE_*T*oken_*S*erver_RLock -{ public: ACE_TS_RLock (const char *name, ACE_Token_Handler *th); @@ -207,9 +209,9 @@ private: }; class ACE_TS_WLock : public ACE_Local_WLock +{ // = TITLE // ACE_TS_WLock -- ACE_*T*oken_*S*erver_WLock -{ public: ACE_TS_WLock (const char *name, ACE_Token_Handler *th); @@ -236,13 +238,11 @@ private: // construction and notified when blocking acquires succeed. }; -// ************************************************************ - class ACE_Token_Acceptor : public ACE_Strategy_Acceptor<ACE_Token_Handler, ACE_SOCK_ACCEPTOR> +{ // = TITLE // This class contains the service-specific methods that can't // easily be factored into the <ACE_Strategy_Acceptor>. -{ public: virtual int init (int argc, char *argv[]); // Dynamic linking hook. diff --git a/tests/DLList_Test.cpp b/tests/DLList_Test.cpp index c5a484e918f..217e23d74ee 100644 --- a/tests/DLList_Test.cpp +++ b/tests/DLList_Test.cpp @@ -70,23 +70,19 @@ run_test (void) for (i = 0; string_table[i] != 0; i++) { - if (i % 2) - { - if (list.insert_tail (&string_table[i]) == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), - string_table[i]), -1); - } - else - { - if (list.insert_head (&string_table[i]) == 0) - ACE_ERROR_RETURN ((LM_ERROR, - ASYS_TEXT ("%p failed for %s \n"), - ASYS_TEXT ("insert"), - string_table[i]), -1); - } - + if (ACE_EVEN (i) + && list.insert_tail ((STRING) &string_table[i]) == 0) + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("%p failed for %s \n"), + ASYS_TEXT ("insert"), + string_table[i]), + -1); + else if (list.insert_head ((STRING) &string_table[i]) == 0) + ACE_ERROR_RETURN ((LM_ERROR, + ASYS_TEXT ("%p failed for %s \n"), + ASYS_TEXT ("insert"), + string_table[i]), + -1); run_iterate (list); } |