diff options
author | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
---|---|---|
committer | brunsch <brunsch@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-04-23 04:43:59 +0000 |
commit | f40cc79fed36173f3588f26d7bec8ee7705dc153 (patch) | |
tree | 61d38d262d43ac77fc2ad94c9e7e850cd5607622 /examples/Web_Crawler | |
parent | 2afe8d4640d7b30bfe959c16212ea87df8e6ec7c (diff) | |
download | ATCD-f40cc79fed36173f3588f26d7bec8ee7705dc153.tar.gz |
ChangeLogTag:Sat Apr 22 20:53:11 2000 Darrell Brunsch <brunsch@uci.edu>
Diffstat (limited to 'examples/Web_Crawler')
-rw-r--r-- | examples/Web_Crawler/Options.cpp | 10 | ||||
-rw-r--r-- | examples/Web_Crawler/Options.h | 16 | ||||
-rw-r--r-- | examples/Web_Crawler/URL_Addr.cpp | 62 | ||||
-rw-r--r-- | examples/Web_Crawler/URL_Addr.h | 16 |
4 files changed, 52 insertions, 52 deletions
diff --git a/examples/Web_Crawler/Options.cpp b/examples/Web_Crawler/Options.cpp index 14d862dd5c4..89b8e90e5bc 100644 --- a/examples/Web_Crawler/Options.cpp +++ b/examples/Web_Crawler/Options.cpp @@ -9,7 +9,7 @@ ACE_RCSID(Web_Crawler, Options, "$Id$") int Options::parse_args (int argc, char *argv[]) { - ACE_Get_Opt getopt (argc, argv, ASYS_TEXT ("df:h:i:l:rt:u:vo:p:")); + ACE_Get_Opt getopt (argc, argv, ACE_TEXT ("df:h:i:l:rt:u:vo:p:")); ACE_LOG_MSG->open (argv[0]); @@ -121,24 +121,24 @@ Options::verbose (void) const return this->verbose_; } -LPCTSTR +const ACE_TCHAR * Options::order (void) const { return this->order_; } -LPCTSTR +const ACE_TCHAR * Options::hostname (void) const { return this->hostname_; } -LPCTSTR +const ACE_TCHAR * Options::path_name (void) const { return this->uri_; } -LPCTSTR +const ACE_TCHAR * Options::url_filter (void) const { return this->url_filter_; diff --git a/examples/Web_Crawler/Options.h b/examples/Web_Crawler/Options.h index 6110dc081c4..48e06f7930c 100644 --- a/examples/Web_Crawler/Options.h +++ b/examples/Web_Crawler/Options.h @@ -44,13 +44,13 @@ public: // If non-0 and the link is an HTML file then recursively check all // links that are embedded in the body of file. - LPCTSTR hostname (void) const; + const ACE_TCHAR *hostname (void) const; // Return the hostname of the initial Web server. - LPCTSTR path_name (void) const; + const ACE_TCHAR *path_name (void) const; // Return the initial URI. - LPCTSTR url_filter (void) const; + const ACE_TCHAR *url_filter (void) const; // String used to filter out which URLs to validate. int debug (void) const; @@ -59,7 +59,7 @@ public: int verbose (void) const; // Are we being verbose? - LPCTSTR order (void) const; + const ACE_TCHAR *order (void) const; // Which order? LIFO|FIFO?? int port_no (void) const; @@ -83,10 +83,10 @@ private: int recurse_; // Are we recursving. - LPCTSTR hostname_; + const ACE_TCHAR *hostname_; // Initial Web server name. - LPCTSTR uri_; + const ACE_TCHAR *uri_; // Initial URI name. int debug_; @@ -95,13 +95,13 @@ private: int verbose_; // Are we being verbose? - LPCTSTR order_; + const ACE_TCHAR *order_; // Whether the URLs are traversed in FIFO or LIFO order. ACE_Time_Value timeout_; // Timeout on <recv> and <connect> to broken Web servers. - LPCTSTR url_filter_; + const ACE_TCHAR *url_filter_; // String used to filter out which URLs to validate. Command_Processor *command_processor_; diff --git a/examples/Web_Crawler/URL_Addr.cpp b/examples/Web_Crawler/URL_Addr.cpp index b60a2c54e06..470ca13fc8c 100644 --- a/examples/Web_Crawler/URL_Addr.cpp +++ b/examples/Web_Crawler/URL_Addr.cpp @@ -11,7 +11,7 @@ ACE_URL_Addr::ACE_URL_Addr (void) } int -ACE_URL_Addr::addr_to_string (LPTSTR s, +ACE_URL_Addr::addr_to_string (ACE_TCHAR *s, size_t size, int ipaddr_format) const { @@ -29,17 +29,17 @@ ACE_URL_Addr::addr_to_string (LPTSTR s, return -1; else { - ACE_OS::sprintf (s, ASYS_TEXT ("%s:%d/%s"), - ASYS_WIDE_STRING (ipaddr_format == 0 - ? this->get_host_name () - : this->get_host_addr ()), + ACE_OS::sprintf (s, ACE_TEXT ("%s:%d/%s"), + ACE_TEXT_CHAR_TO_TCHAR (ipaddr_format == 0 + ? this->get_host_name () + : this->get_host_addr ()), this->get_port_number (), this->get_path_name ()); return 0; } } -LPCTSTR +const ACE_TCHAR * ACE_URL_Addr::addr_to_string (int ipaddr_format) const { ACE_URL_Addr *this_ptr = ACE_const_cast (ACE_URL_Addr *, @@ -64,20 +64,20 @@ ACE_URL_Addr::addr_to_string (int ipaddr_format) const this_ptr->addr_string_len_ = size; } ACE_OS::sprintf (this->addr_string_, - ASYS_TEXT ("%s:%d/%s"), - ASYS_WIDE_STRING (ipaddr_format == 0 - ? this->get_host_name () - : this->get_host_addr ()), + ACE_TEXT ("%s:%d/%s"), + ACE_TEXT_CHAR_TO_TCHAR (ipaddr_format == 0 + ? this->get_host_name () + : this->get_host_addr ()), this->get_port_number (), this->get_path_name ()); return this->addr_string_; } -int -ACE_URL_Addr::string_to_addr (LPCTSTR s) +int +ACE_URL_Addr::string_to_addr (const ACE_TCHAR *s) { int result; - LPTSTR t; + ACE_TCHAR *t; // Need to make a duplicate since we'll be overwriting the string. ACE_ALLOCATOR_RETURN (t, @@ -87,8 +87,8 @@ ACE_URL_Addr::string_to_addr (LPCTSTR s) // First split off the path_name. - LPTSTR path_name = ACE_OS::strchr (t, '/'); - LPCTSTR name = "index.html"; + ACE_TCHAR *path_name = ACE_OS::strchr (t, '/'); + const ACE_TCHAR *name = "index.html"; if (path_name != 0) { if (ACE_OS::strlen (path_name + 1) > 0) @@ -103,9 +103,9 @@ ACE_URL_Addr::string_to_addr (LPCTSTR s) -1); // Now handle the host address and port number. - LPTSTR port_number = ACE_OS::strchr (t, ':'); + ACE_TCHAR *port_number = ACE_OS::strchr (t, ':'); - if (port_number == 0) + if (port_number == 0) { // Assume it's an ip-address or ip-number. result = this->ACE_INET_Addr::set (ACE_DEFAULT_HTTP_PORT, @@ -129,17 +129,17 @@ ACE_URL_Addr::ACE_URL_Addr (const ACE_URL_Addr &addr) { if (this->set (addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); } -int +int ACE_URL_Addr::set (const ACE_URL_Addr &addr) { - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (char *, this->path_name_))); - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (char *, this->addr_string_))); if (this->ACE_INET_Addr::set (addr) == -1) @@ -165,8 +165,8 @@ ACE_URL_Addr::operator= (const ACE_URL_Addr &addr) { if (this->set (addr) == -1) ACE_ERROR ((LM_ERROR, - ASYS_TEXT ("%p\n"), - ASYS_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); + ACE_TEXT ("%p\n"), + ACE_TEXT ("ACE_URL_Addr::ACE_URL_Addr"))); } u_long @@ -181,7 +181,7 @@ ACE_URL_Addr::hash (void) const int ACE_URL_Addr::operator== (const ACE_URL_Addr &addr) const { - return ACE_OS::strcmp (addr.get_path_name (), + return ACE_OS::strcmp (addr.get_path_name (), this->get_path_name ()) == 0 && addr.get_port_number () == this->get_port_number () && addr.get_ip_address () == this->get_ip_address (); @@ -193,8 +193,8 @@ ACE_URL_Addr::operator!= (const ACE_URL_Addr &addr) const return !(*this == addr); } -ACE_URL_Addr::ACE_URL_Addr (LPCTSTR host_name, - LPCTSTR path_name, +ACE_URL_Addr::ACE_URL_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path_name, u_short port) : ACE_INET_Addr (port, host_name), path_name_ (ACE_OS::strdup (path_name)), @@ -203,7 +203,7 @@ ACE_URL_Addr::ACE_URL_Addr (LPCTSTR host_name, { } -LPCTSTR +const ACE_TCHAR * ACE_URL_Addr::get_path_name (void) const { return this->path_name_; @@ -211,16 +211,16 @@ ACE_URL_Addr::get_path_name (void) const ACE_URL_Addr::~ACE_URL_Addr (void) { - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (LPTSTR, this->path_name_))); - ACE_OS::free (ACE_reinterpret_cast (void *, + ACE_OS::free (ACE_reinterpret_cast (void *, ACE_const_cast (LPTSTR, this->addr_string_))); this->path_name_ = 0; } -int +int ACE_URL_Addr::destroy (void) { // Commit suicide. diff --git a/examples/Web_Crawler/URL_Addr.h b/examples/Web_Crawler/URL_Addr.h index c966033003d..82961b7e136 100644 --- a/examples/Web_Crawler/URL_Addr.h +++ b/examples/Web_Crawler/URL_Addr.h @@ -32,8 +32,8 @@ public: ACE_URL_Addr (void); // Constructor. - ACE_URL_Addr (LPCTSTR host_name, - LPCTSTR path_name, + ACE_URL_Addr (const ACE_TCHAR *host_name, + const ACE_TCHAR *path_name, u_short port = ACE_DEFAULT_HTTP_PORT); ACE_URL_Addr (const ACE_URL_Addr &addr); @@ -42,7 +42,7 @@ public: int set (const ACE_URL_Addr &addr); // Essentially the copy constructor. - virtual int string_to_addr (LPCTSTR address); + virtual int string_to_addr (const ACE_TCHAR *address); // Initializes an <ACE_URL_Addr> from the <address>, which can be // "ip-number:port-number/path-name" (e.g., // "www.cs.wustl.edu:1234/~schmidt/" "ip-number:port-number/path-name" @@ -50,7 +50,7 @@ public: // the <address> it is assumed to be an ip-number or ip-address // number, with the port number <ACE_DEFAULT_HTTP_PORT>. - virtual int addr_to_string (LPTSTR s, + virtual int addr_to_string (ACE_TCHAR *s, size_t size, int ipaddr_format = 1) const; // Transform the current <ACE_INET_Addr> address into string format. @@ -61,7 +61,7 @@ public: // "www.cs.wustl.edu:80/~schmidt/"). Returns -1 if the <size> of // the <buffer> is too small, else 0. - virtual LPCTSTR addr_to_string (int ipaddr_format = 1) const; + virtual const ACE_TCHAR *addr_to_string (int ipaddr_format = 1) const; // Transform the current <ACE_INET_Addr> address into string format. // If <ipaddr_format> is non-0 this produces // "ip-number:port-number/path-name" (e.g., @@ -88,16 +88,16 @@ public: virtual u_long hash (void) const; // Computes and returns hash value. - LPCTSTR get_path_name (void) const; + const ACE_TCHAR *get_path_name (void) const; // Return the path name. int destroy (void); // Commit suicide. private: - LPTSTR path_name_; + ACE_TCHAR *path_name_; // Our path name. - LPTSTR addr_string_; + ACE_TCHAR *addr_string_; // The dynamically address string that's used for the // <addr_to_string> method. |