diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-15 21:32:25 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 2001-11-15 21:32:25 +0000 |
commit | 9923419fc5467b0e332c942dc012a390cee69a21 (patch) | |
tree | d1038556f0c918960f732417ad3fc120fbff65eb /apps | |
parent | e475f51608e9415cb7ba76bed408c5346553eb40 (diff) | |
download | ATCD-9923419fc5467b0e332c942dc012a390cee69a21.tar.gz |
ChangeLogTag:Thu Nov 15 08:26:57 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/JAWS/ChangeLog | 9 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Blob.cpp | 5 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Blob.h | 6 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Blob_Handler.cpp | 12 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Blob_Handler.h | 11 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Options.cpp | 4 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/Options.h | 4 | ||||
-rw-r--r-- | apps/JAWS/clients/Blobby/blobby.cpp | 2 |
8 files changed, 33 insertions, 20 deletions
diff --git a/apps/JAWS/ChangeLog b/apps/JAWS/ChangeLog index 9d7992eeea5..ea1590cf3de 100644 --- a/apps/JAWS/ChangeLog +++ b/apps/JAWS/ChangeLog @@ -1,3 +1,12 @@ +Wed Nov 14 16:21:46 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> + + * clients/Blobby/Blob.{h,cpp}, + * clients/Blobby/Blob_Handler.{h,cpp}, + * clients/Blobby/blobby.{h,cpp}, + * clients/Blobby/Options.{h,cpp}: + Fixed the code to be Unicode-compliant. Thanks to Johnny + Willemsen for contributing this. + Fri Aug 24 18:39:39 2001 Douglas C. Schmidt <schmidt@macarena.cs.wustl.edu> * server/HTTP_Response.cpp (normal_response), diff --git a/apps/JAWS/clients/Blobby/Blob.cpp b/apps/JAWS/clients/Blobby/Blob.cpp index 46ea942f714..207a9cc5ded 100644 --- a/apps/JAWS/clients/Blobby/Blob.cpp +++ b/apps/JAWS/clients/Blobby/Blob.cpp @@ -17,14 +17,13 @@ ACE_Blob::~ACE_Blob (void) // initialize address and filename. No network i/o in open int -ACE_Blob::open (char *filename, const char *hostname , u_short port) +ACE_Blob::open (ACE_TCHAR *filename, const ACE_TCHAR *hostname , u_short port) { - filename_ = ACE_OS::strdup(filename); + filename_ = ACE_OS_String::strdup (filename); inet_addr_.set (port, hostname); return 0; } - // read from connection length bytes from offset, into Message block int diff --git a/apps/JAWS/clients/Blobby/Blob.h b/apps/JAWS/clients/Blobby/Blob.h index 4fe63c8da9f..b2c078b0af2 100644 --- a/apps/JAWS/clients/Blobby/Blob.h +++ b/apps/JAWS/clients/Blobby/Blob.h @@ -49,8 +49,8 @@ public: ACE_Blob (void); ~ACE_Blob (void); - int open (char *filename, - const char *hostname = ACE_DEFAULT_SERVER_HOST , + int open (ACE_TCHAR *filename, + const ACE_TCHAR *hostname = ACE_DEFAULT_SERVER_HOST , u_short port = 80); // initializes the class with the given filename, hostname and port. // it should be called with the filename, before any read/write calls @@ -76,7 +76,7 @@ private: ACE_INET_Addr inet_addr_; // store the internet address of the server - char *filename_; + ACE_TCHAR *filename_; // The filename ACE_Connector<ACE_Blob_Handler, ACE_SOCK_CONNECTOR> connector_; diff --git a/apps/JAWS/clients/Blobby/Blob_Handler.cpp b/apps/JAWS/clients/Blobby/Blob_Handler.cpp index 72a8653efc8..783736eb05f 100644 --- a/apps/JAWS/clients/Blobby/Blob_Handler.cpp +++ b/apps/JAWS/clients/Blobby/Blob_Handler.cpp @@ -13,11 +13,11 @@ ACE_Blob_Handler::ACE_Blob_Handler (void) ACE_Blob_Handler::ACE_Blob_Handler (ACE_Message_Block * mb, size_t length, size_t offset, - char *filename) : + ACE_TCHAR *filename) : mb_ (mb), length_ (length), offset_ (offset), - filename_ (ACE_OS::strdup (filename)), + filename_ (ACE_OS_String::strdup (filename)), bytecount_ (0) { } @@ -80,7 +80,7 @@ ACE_Blob_Handler::byte_count (void) ACE_Blob_Reader::ACE_Blob_Reader (ACE_Message_Block * mb, size_t length, size_t offset, - char *filename, + ACE_TCHAR *filename, const char *request_prefix, const char *request_suffix) : ACE_Blob_Handler (mb, length, offset, filename), @@ -96,7 +96,9 @@ ACE_Blob_Reader::send_request (void) char mesg [MAX_HEADER_SIZE]; // Check to see if the request is too big - if ( MAX_HEADER_SIZE < (strlen (request_prefix_) + strlen (filename_) + strlen (request_suffix_) + 4)) + if (MAX_HEADER_SIZE < (ACE_OS_String::strlen (request_prefix_) + + ACE_OS_String::strlen (filename_) + + ACE_OS_String::strlen (request_suffix_) + 4)) ACE_ERROR_RETURN((LM_ERROR,"Request too large!"), -1); // Create a message to send to the server requesting retrieval of the file @@ -242,7 +244,7 @@ ACE_Blob_Reader::receive_reply (void) ACE_Blob_Writer::ACE_Blob_Writer (ACE_Message_Block * mb, size_t length, size_t offset, - char *filename, + ACE_TCHAR *filename, const char *request_prefix, const char *request_suffix) : ACE_Blob_Handler (mb, length, offset, filename), diff --git a/apps/JAWS/clients/Blobby/Blob_Handler.h b/apps/JAWS/clients/Blobby/Blob_Handler.h index 135c1200b6f..b18df484ac5 100644 --- a/apps/JAWS/clients/Blobby/Blob_Handler.h +++ b/apps/JAWS/clients/Blobby/Blob_Handler.h @@ -47,7 +47,10 @@ public: ACE_Blob_Handler (void); // Null constructor, insures that it works properly with Connector - ACE_Blob_Handler (ACE_Message_Block *mb, size_t length, size_t offset, char *filename); + ACE_Blob_Handler (ACE_Message_Block *mb, + size_t length, + size_t offset, + ACE_TCHAR *filename); // Always use this constructor to make Blob_Handlers int byte_count (void); @@ -68,7 +71,7 @@ protected: ACE_Message_Block *mb_; size_t length_; size_t offset_; - char *filename_; + ACE_TCHAR *filename_; int bytecount_; enum { @@ -84,7 +87,7 @@ public: ACE_Blob_Reader (ACE_Message_Block *mb, size_t length, size_t offset, - char *filename, + ACE_TCHAR *filename, const char *request_prefix = "GET", const char *request_suffix = "HTTP/1.0\r\n\r\n"); @@ -101,7 +104,7 @@ public: ACE_Blob_Writer (ACE_Message_Block *mb, size_t length, size_t offset, - char *filename, + ACE_TCHAR *filename, const char *request_prefix = "PUT", const char *request_suffix = "HTTP/1.0\nContent-length:"); diff --git a/apps/JAWS/clients/Blobby/Options.cpp b/apps/JAWS/clients/Blobby/Options.cpp index 801441ed52a..4c28033ae19 100644 --- a/apps/JAWS/clients/Blobby/Options.cpp +++ b/apps/JAWS/clients/Blobby/Options.cpp @@ -21,9 +21,9 @@ Options::instance (void) } void -Options::parse_args (int argc, char *argv[]) +Options::parse_args (int argc, ACE_TCHAR *argv[]) { - ACE_Get_Opt get_opt (argc, argv, "rwh:p:f:l:o:d"); + ACE_Get_Opt get_opt (argc, argv, ACE_TEXT ("rwh:p:f:l:o:d")); int c; diff --git a/apps/JAWS/clients/Blobby/Options.h b/apps/JAWS/clients/Blobby/Options.h index 5fe61c55cfa..47c0c852036 100644 --- a/apps/JAWS/clients/Blobby/Options.h +++ b/apps/JAWS/clients/Blobby/Options.h @@ -36,7 +36,7 @@ public: static Options *instance (void); // Returns the singleton instance - void parse_args (int argc, char *argv[]); + void parse_args (int argc, ACE_TCHAR *argv[]); // parses commandline arguments char *hostname_; @@ -45,7 +45,7 @@ public: u_short port_; // Port number to use - char *filename_; + ACE_TCHAR *filename_; // Filename to upload/download int length_; diff --git a/apps/JAWS/clients/Blobby/blobby.cpp b/apps/JAWS/clients/Blobby/blobby.cpp index 21ea46780b6..46e3854b266 100644 --- a/apps/JAWS/clients/Blobby/blobby.cpp +++ b/apps/JAWS/clients/Blobby/blobby.cpp @@ -27,7 +27,7 @@ ACE_RCSID(Blobby, blobby, "$Id$") int -main (int argc, char *argv[]) +main (int argc, ACE_TCHAR *argv[]) { // Options is a singleton Options *options = Options::instance (); |