00001 /************************************************************************ 00002 * Copyright (C) 2005-2009 Philipp Marek. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License version 3 as 00006 * published by the Free Software Foundation. 00007 ************************************************************************/ 00008 00009 #ifndef __CHECKSUM_H__ 00010 #define __CHECKSUM_H__ 00011 00012 #include "global.h" 00013 #include "interface.h" 00014 #include <subversion-1/svn_delta.h> 00015 00022 struct cs__manber_hashes 00023 { 00025 AC_CV_C_UINT32_T *hash; 00027 md5_digest_t *md5; 00030 off_t *end; 00032 AC_CV_C_UINT32_T *index; 00033 00035 unsigned count; 00036 }; 00037 00038 00040 int cs__compare_file(struct estat *sts, char *fullpath, int *result); 00042 char* cs__md5tohex(const md5_digest_t md5, char *dest); 00044 char *cs__md5tohex_buffered(const md5_digest_t md5); 00046 int cs__char2md5(const char *input, char **eos, md5_digest_t md5); 00047 00049 int cs__set_file_committed(struct estat *sts); 00050 00053 int cs__new_manber_filter(struct estat *sts, 00054 svn_stream_t *stream_input, 00055 svn_stream_t **filter_stream, 00056 apr_pool_t *pool); 00057 00059 int cs__read_manber_hashes(struct estat *sts, 00060 struct cs__manber_hashes *data); 00061 00063 int cs__two_ch2bin(char *stg); 00064 00065 #endif 00066