--- parser3/src/include/pa_common.h 2003/03/18 15:14:16 1.89.2.13.2.1 +++ parser3/src/include/pa_common.h 2003/03/20 14:19:08 1.89.2.13.2.4 @@ -8,14 +8,16 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char* IDENT_COMMON_H="$Date: 2003/03/18 15:14:16 $"; +static const char* IDENT_COMMON_H="$Date: 2003/03/20 14:19:08 $"; #include "pa_string.h" #include "pa_hash.h" -#include "pa_value.h" -typedef Hash HashStringValue; +//#include "pa_value.h" +//typedef Hash HashStringValue; + +class HashStringValue; // replace system s*nprintf with our versions #undef vsnprintf @@ -109,7 +111,7 @@ bool file_read_action_under_lock(const S bool as_text=false, bool fail_on_read_problem=true); /** - read specified text file using pool, + read specified text file using if fail_on_read_problem is true[default] throws an exception WARNING: charset is used for http header case conversion, it's not a charset of input file! @@ -119,16 +121,16 @@ bool file_read_action_under_lock(const S char *file_read_text(Charset& charset, const String& file_spec, bool fail_on_read_problem=true, - HashStringValue* options=0/*, HashStringValuePtr* out_fields=0*/); + HashStringValue* options=0/*, HashStringValue* * out_fields=0*/); struct File_read_result { bool success; - char* data; size_t size; - HashStringValuePtr headers; + char* str; size_t length; + HashStringValue* headers; }; /** - read specified file using pool, + read specified file using if fail_on_read_problem is true[default] throws an exception WARNING: charset is used for http header case conversion, it's not a charset of input file! @@ -184,7 +186,7 @@ bool entry_exists(const char* fname, str bool entry_exists(const String& file_spec); bool file_readable(const String& file_spec); bool dir_readable(const String& file_spec); -const String& file_readable(String& path, String& name); +const String* file_readable(String& path, String& name); bool file_executable(const String& file_spec); bool file_stat(const String& file_spec, @@ -236,6 +238,6 @@ void remove_crlf(char *start, char *end) // globals -extern const String& file_status_name; +extern const String file_status_name; #endif