--- parser3/src/include/pa_common.h 2006/11/17 09:35:44 1.110 +++ parser3/src/include/pa_common.h 2007/02/07 15:49:51 1.112 @@ -8,7 +8,7 @@ #ifndef PA_COMMON_H #define PA_COMMON_H -static const char * const IDENT_COMMON_H="$Date: 2006/11/17 09:35:44 $"; +static const char * const IDENT_COMMON_H="$Date: 2007/02/07 15:49:51 $"; #include "pa_string.h" #include "pa_hash.h" @@ -214,6 +214,15 @@ void check_safe_mode(struct stat finfo, void pa_base64_decode(const char *in, size_t in_size, char*& result, size_t& result_size); char* pa_base64_encode(const char *in, size_t in_size); +struct File_base64_action_info { + unsigned char** base64; +}; +char* pa_base64_encode(const String& file_spec); +static void file_base64_file_action( + struct stat& finfo, + int f, + const String&, const char* /*fname*/, bool, + void *context); #define FILE_BUFFER_SIZE 4096 static unsigned long crc32Table[256]; @@ -239,6 +248,8 @@ static void InitCrc32Table() } } +int file_block_read(const int f, unsigned char* buffer, const size_t size); + inline void CalcCrc32(const unsigned char byte, unsigned long &crc32) { crc32 = ((crc32) >> 8) ^ crc32Table[(byte) ^ ((crc32) & 0x000000FF)];