--- parser3/src/include/pa_common.h 2005/08/05 13:02:58 1.101.8.1 +++ parser3/src/include/pa_common.h 2005/11/24 14:05:04 1.101.8.5 @@ -8,7 +8,7 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char * const IDENT_COMMON_H="$Date: 2005/08/05 13:02:58 $"; +static const char * const IDENT_COMMON_H="$Date: 2005/11/24 14:05:04 $"; #include "pa_string.h" #include "pa_hash.h" @@ -163,9 +163,9 @@ void file_move(const String& old_spec, c bool entry_exists(const char* fname, struct stat *afinfo=0); 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(const String& path, const String& name); +bool file_exist(const String& file_spec); +bool dir_exists(const String& file_spec); +const String* file_exist(const String& path, const String& name); bool file_executable(const String& file_spec); bool file_stat(const String& file_spec, @@ -212,10 +212,20 @@ void remove_crlf(char *start, char *end) void check_safe_mode(struct stat finfo, const String& file_spec, const char* fname); #endif -char* pa_base64(const char *in, size_t len); +char* pa_base64_encode(const char *in, size_t in_size); +void pa_base64_decode(const char *in, size_t in_size, char*& result, size_t& result_size); + +int pa_get_valid_file_options_count(HashStringValue& options); // globals extern const String file_status_name; +// global defines for file options which are handled but not checked elsewhere, we check them + +#define PA_SQL_LIMIT_NAME "limit" +#define PA_SQL_OFFSET_NAME "offset" +#define PA_COLUMN_SEPARATOR_NAME "separator" +#define PA_COLUMN_ENCLOSER_NAME "encloser" + #endif