--- parser3/src/main/pa_stylesheet_manager.C 2003/01/31 12:34:38 1.16.2.1 +++ parser3/src/main/pa_stylesheet_manager.C 2003/02/21 08:50:03 1.16.2.4 @@ -7,7 +7,7 @@ #include "pa_config_includes.h" #ifdef XML -static const char* IDENT_STYLESHEET_MANAGER_C="$Date: 2003/01/31 12:34:38 $"; +static const char* IDENT_STYLESHEET_MANAGER_C="$Date: 2003/02/21 08:50:03 $"; #include "pa_stylesheet_manager.h" #include "pa_stylesheet_connection.h" @@ -62,9 +62,7 @@ Stylesheet_connection_ptr Stylesheet_man // then just construct it // make global_file_spec C-string on global pool - const char* request_file_spec_cstr=request_file_spec.cstr(String::UL_FILE_SPEC); - char *global_file_spec_cstr=(char *)malloc(strlen(request_file_spec_cstr)+1); - strcpy(global_file_spec_cstr, request_file_spec_cstr); + CharPtr global_file_spec_cstr=request_file_spec.cstr(this->pool(pool), String::UL_FILE_SPEC); // make global_file_spec string on global pool String& global_file_spec=*new(this->pool()) String(this->pool(), global_file_spec_cstr); @@ -134,11 +132,7 @@ static void add_connection_to_status_cac row+=&connection.file_spec(); // time time_t time_stamp=connection.get_time_used(); - const char* unsafe_time_cstr=ctime(&time_stamp); - int time_buf_size=strlen(unsafe_time_cstr); - char *safe_time_buf=(char *)pool.malloc(time_buf_size); - memcpy(safe_time_buf, unsafe_time_cstr, time_buf_size); - row+=new(pool) String(pool, safe_time_buf, time_buf_size); + row+=new(pool) String(pool, pool.copy(ctime(&time_stamp))); table+=&row; }