diff options
author | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-12-04 04:09:35 +0000 |
---|---|---|
committer | Ossama Othman <ossama-othman@users.noreply.github.com> | 2000-12-04 04:09:35 +0000 |
commit | 21d253d0fbdbeb80be83a9c47c9b7bbe42245e6d (patch) | |
tree | 1652758cdfd5c0868a04bfdb4cc035fc719f569b /examples | |
parent | 86f1f282e2fd927ef8d0d7d60fac9b4f4116d68b (diff) | |
download | ATCD-21d253d0fbdbeb80be83a9c47c9b7bbe42245e6d.tar.gz |
ChangeLogTag:Sun Dec 3 20:03:16 2000 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/Web_Crawler/Command_Processor.cpp | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/examples/Web_Crawler/Command_Processor.cpp b/examples/Web_Crawler/Command_Processor.cpp index a9ef31bf9d8..95b78b77a33 100644 --- a/examples/Web_Crawler/Command_Processor.cpp +++ b/examples/Web_Crawler/Command_Processor.cpp @@ -1,4 +1,4 @@ - // $Id$ +// $Id$ #include "URL.h" #include "HTTP_URL.h" @@ -33,7 +33,7 @@ URL_Command::execute (void) if (check_string.find (".gif") >= 0) return 0; - + if (check_string.find (".pdf") >= 0) return 0; @@ -42,13 +42,13 @@ URL_Command::execute (void) if (check_string.find (".bmp") >= 0) return 0; - + if (check_string.find (".jpg") >= 0) return 0; - + if (this->url_->accept (OPTIONS::instance ()->visitor ()) !=0) { - ACE_DEBUG ((LM_DEBUG, + ACE_DEBUG ((LM_DEBUG, "Coudnt accept url\n")); return -1; } @@ -101,7 +101,7 @@ Command_Processor::execute (void) int Command_Processor::insert (Command *command) { - // According to the order specified the commands are removed from the queue. + // According to the order specified the commands are removed from the queue. if (this->url_queue_.is_full() != 1) { if (ACE_OS::strcmp (OPTIONS::instance ()->order (),"FIFO") == 0) @@ -110,28 +110,26 @@ Command_Processor::insert (Command *command) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "enqueue_tail"), - 1); - } + } if (ACE_OS::strcmp (OPTIONS::instance ()->order (),"LIFO") == 0) { if (this->url_queue_.enqueue_head (command) !=0) ACE_ERROR_RETURN ((LM_ERROR, "%p\n", "enqueue_head"), - 1); - } + } } - return 0; + return 0; } #if defined (ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION) template class ACE_Singleton<Options, ACE_Null_Mutex>; -template class ACE_Unbounded_Queue<Command *>; template class ACE_Node<Command *>; template class ACE_Unbounded_Queue_Iterator<Command *>; template class ACE_Unbounded_Queue<Command *>; #elif defined (ACE_HAS_TEMPLATE_INSTANTIATION_PRAGMA) #pragma instantiate ACE_Singleton<Options, ACE_Null_Mutex> -#pragma instantiate ACE_Unbounded_Queue<Command *> -#pragma instantiate ACE_Node<Command *> +#pragma instantiate ACE_Node<Command *> #pragma instantiate ACE_Unbounded_Queue_Iterator<Command *> #pragma instantiate ACE_Unbounded_Queue<Command *> #endif /* ACE_HAS_EXPLICIT_TEMPLATE_INSTANTIATION */ |