diff options
author | Steve Huston <shuston@riverace.com> | 1999-07-06 01:39:30 +0000 |
---|---|---|
committer | Steve Huston <shuston@riverace.com> | 1999-07-06 01:39:30 +0000 |
commit | bd9bed7d5ed3788a180901033d31fffde4242e39 (patch) | |
tree | caeb9bf05f485b45168e9a8845f988c050fffa7c /apps/JAWS/server | |
parent | b8bdc4d8335322ff03de22cbf4b1c9b787b9fd2b (diff) | |
download | ATCD-bd9bed7d5ed3788a180901033d31fffde4242e39.tar.gz |
const-corrected for char pointers.
Diffstat (limited to 'apps/JAWS/server')
-rw-r--r-- | apps/JAWS/server/HTTP_Config.cpp | 16 | ||||
-rw-r--r-- | apps/JAWS/server/HTTP_Config.h | 16 | ||||
-rw-r--r-- | apps/JAWS/server/HTTP_Response.cpp | 8 | ||||
-rw-r--r-- | apps/JAWS/server/HTTP_Response.h | 6 |
4 files changed, 27 insertions, 19 deletions
diff --git a/apps/JAWS/server/HTTP_Config.cpp b/apps/JAWS/server/HTTP_Config.cpp index dce8ddf8a5e..ec67142c970 100644 --- a/apps/JAWS/server/HTTP_Config.cpp +++ b/apps/JAWS/server/HTTP_Config.cpp @@ -71,8 +71,8 @@ HTTP_Config_Info::proxy_flag (void) const return this->proxy_flag_; } -char * -HTTP_Config_Info::document_root (char *dr_string) +const char * +HTTP_Config_Info::document_root (const char *dr_string) { if (dr_string) this->document_root_ = dr_string; @@ -86,8 +86,8 @@ HTTP_Config_Info::document_root (char *dr_string) return this->document_root_; } -char * -HTTP_Config_Info::cgi_path (char *cp_string) +const char * +HTTP_Config_Info::cgi_path (const char *cp_string) { if (cp_string) this->cgi_path_ = cp_string; @@ -102,8 +102,8 @@ HTTP_Config_Info::cgi_path (char *cp_string) return this->cgi_path_; } -char * -HTTP_Config_Info::user_dir (char *ud_string) +const char * +HTTP_Config_Info::user_dir (const char *ud_string) { if (ud_string) this->user_dir_ = ud_string; @@ -117,8 +117,8 @@ HTTP_Config_Info::user_dir (char *ud_string) return this->user_dir_; } -char * -HTTP_Config_Info::dir_index (char *di_string) +const char * +HTTP_Config_Info::dir_index (const char *di_string) { if (di_string) this->dir_index_ = di_string; diff --git a/apps/JAWS/server/HTTP_Config.h b/apps/JAWS/server/HTTP_Config.h index 1f978972750..39c76c44d1b 100644 --- a/apps/JAWS/server/HTTP_Config.h +++ b/apps/JAWS/server/HTTP_Config.h @@ -68,26 +68,26 @@ public: private: // = Accesors that can set the data - char *document_root (char *dr_string); - char *cgi_path (char *cp_string); - char *user_dir (char *ud_string); - char *dir_index (char *di_string); + const char *document_root (const char *dr_string); + const char *cgi_path (const char *cp_string); + const char *user_dir (const char *ud_string); + const char *dir_index (const char *di_string); int proxy_flag (int pf); private: // = Data members - char *document_root_; + const char *document_root_; // The directory root from which documents will be fetched - char *cgi_path_; + const char *cgi_path_; // The directories from which to expect CGI scripts - char *user_dir_; + const char *user_dir_; // Name of the sub-directory where user Web pages are - char *dir_index_; + const char *dir_index_; // Name of the Web page to present in place of a directory listing int proxy_flag_; diff --git a/apps/JAWS/server/HTTP_Response.cpp b/apps/JAWS/server/HTTP_Response.cpp index b3d28e4790a..0c2bf3405c1 100644 --- a/apps/JAWS/server/HTTP_Response.cpp +++ b/apps/JAWS/server/HTTP_Response.cpp @@ -11,7 +11,11 @@ ACE_RCSID(server, HTTP_Response, "$Id$") -static char * const EMPTY_HEADER = (char *)""; +#if defined (ACE_JAWS_BASELINE) +static char * const EMPTY_HEADER = ""; +#else +static const char * const EMPTY_HEADER = ""; +#endif /* ACE_JAWS_BASELINE */ HTTP_Response::HTTP_Response (JAWS_IO &io, HTTP_Request &request) : io_(io), request_(request) @@ -320,7 +324,7 @@ HTTP_Response::build_headers (void) if (this->request_.version () == 0 || ACE_OS::strcmp ("HTTP/0.9", this->request_.version ()) == 0) { - HTTP_HEADER = (char *) EMPTY_HEADER; + HTTP_HEADER = EMPTY_HEADER; HTTP_HEADER_LENGTH = 0; } else diff --git a/apps/JAWS/server/HTTP_Response.h b/apps/JAWS/server/HTTP_Response.h index 3b9a63b6433..2bd8d21fbc0 100644 --- a/apps/JAWS/server/HTTP_Response.h +++ b/apps/JAWS/server/HTTP_Response.h @@ -66,8 +66,12 @@ private: HTTP_Request &request_; // The IO and Request objects associated with this re +#if defined (ACE_JAWS_BASELINE) char *HTTP_HEADER; - char *HTTP_TRAILER; +#else + const char *HTTP_HEADER; +#endif + const char *HTTP_TRAILER; int HTTP_HEADER_LENGTH; int HTTP_TRAILER_LENGTH; // HTTP Headers and trailers. |