Mod Cplusplus CVS committal
Author : johnksterling
Project : mod_cplusplus
Module : src
Dir : mod_cplusplus/src
Modified Files:
apache_output_buffer.cpp request_env.cpp
Log Message:
remove hash deps
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/apache_output_buffer.cpp,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- apache_output_buffer.cpp 15 Aug 2003 22:46:03 -0000 1.5
+++ apache_output_buffer.cpp 18 Aug 2003 01:23:36 -0000 1.6
@@ -21,7 +21,7 @@
this->signal_sending();
int ret_val;
- ret_val = ap_rputs(memory_, r_ );
+ ret_val = ap_rputs(memory_.c_str(), r_ );
if ( -1 != ret_val ) {
memory_ = "";
}
===================================================================
RCS file: /cvsroot/modcplusplus/mod_cplusplus/src/request_env.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- request_env.cpp 15 Aug 2003 22:46:03 -0000 1.4
+++ request_env.cpp 18 Aug 2003 01:23:36 -0000 1.5
@@ -25,7 +25,7 @@
output_buffer_.flush();
}
-request_env::request_env( request_rec *r, bool buffer = false ) :
+request_env::request_env( request_rec *r, bool buffer ) :
/* seems silly/dangerous to to do this, as output_buffer
* isn't defined yet, but is needed to keep gcc 3.x happy
*/
@@ -36,7 +36,7 @@
this->rdbuf( &output_buffer_ );
std::string cur_env;
- env_value *pPtr=0;
+ env_value *pEnv=0;
len_read_=0;
@@ -47,16 +47,16 @@
char buf[ENV_READ_LEN];
while( (len_read_ = ap_get_client_block(r_, buf, sizeof(buf)-1) ) > 0) {
buf[len_read_]='\0';
- this->decode( buf,pPtr,cur_env );
+ this->decode( buf,pEnv,cur_env );
}
} else {
if (r->args)
- this->decode( r->args,pPtr,cur_env );
+ this->decode( r->args,pEnv,cur_env );
}
}
void
-request_env::decode( char *ch, env_value *pPtr, std::string& pStr ){
+request_env::decode( char *ch, env_value *pEnv, std::string& pStr ){
/* basic steps in alogorith taken from:
* http://www.papillion.ne.us/~sthomas/cgi_in_c.html
@@ -78,10 +78,10 @@
/* have we reached the end of the curent name? */
case '=':
if ( ! pStr.empty() ) {
- pPtr = this->search(pStr);
- if ( ! pPtr ) {
- pPtr = new env_value;
- env_[pStr] =pPtr;
+ pEnv = this->search(pStr);
+ if ( ! pEnv ) {
+ pEnv = new env_value;
+ env_.push_back(pEnv);
}
pStr = "";
}
@@ -91,8 +91,8 @@
* and are switching to a new name?
*/
case '&':
- if ( ( ! pStr.empty() ) && pPtr) {
- pPtr->add_value( pStr );
+ if ( ( ! pStr.empty() ) && pEnv) {
+ pEnv->add_value( pStr );
pStr = "";
}
break;
@@ -121,8 +121,8 @@
break;
}
}
- if ( ( ! pStr.empty() ) && pPtr){
- pPtr->add_value( pStr );
+ if ( ( ! pStr.empty() ) && pEnv){
+ pEnv->add_value( pStr );
}
}
@@ -133,11 +133,6 @@
request_env::~request_env(){
output_buffer_.flush();
-
- for ( hash_type::const_iterator it = env_.begin();
- it != env_.end(); it++ ) {
- delete (*it).second;
- }
}
bool
@@ -157,29 +152,13 @@
env_value*
request_env::search(const std::string& key){
- env_value *ret_val = 0;
-
- hash_type::const_iterator it = env_.find(key);
-
- if ( it != env_.end() ){
- ret_val = (*it).second;
- }
- return ret_val;
+ /** XXX-jks implement me **/
}
void
request_env::dump(){
(*this) << "I recieved: " << env_.size() << " elements\n";
-
- for( hash_type::const_iterator it = env_.begin();
- it != env_.end(); it++ ) {
- (*this) << (*it).first << " has " << (*it).second->num_vals() << " values\n";
-
- for ( int i = 0; i < (*it).second->num_vals() ; i++ ){
- (*this) << " " << (*(*it).second)[i] << "\n";
- }
- }
}
bool
|