Staging
v0.5.1
https://github.com/git/git
Revision 4c1611249432733818e724fe04a3e9b04848cdab authored by Junio C Hamano on 01 May 2007, 00:30:02 UTC, committed by Junio C Hamano on 01 May 2007, 00:30:02 UTC
Signed-off-by: Junio C Hamano <junkio@cox.net>
1 parent 07c785d
Raw File
Tip revision: 4c1611249432733818e724fe04a3e9b04848cdab authored by Junio C Hamano on 01 May 2007, 00:30:02 UTC
GIT v1.5.2-rc1
Tip revision: 4c16112
csum-file.h
#ifndef CSUM_FILE_H
#define CSUM_FILE_H

/* A SHA1-protected file */
struct sha1file {
	int fd, error;
	unsigned int offset, namelen;
	SHA_CTX ctx;
	char name[PATH_MAX];
	int do_crc;
	uint32_t crc32;
	unsigned char buffer[8192];
};

extern struct sha1file *sha1fd(int fd, const char *name);
extern struct sha1file *sha1create(const char *fmt, ...) __attribute__((format (printf, 1, 2)));
extern int sha1close(struct sha1file *, unsigned char *, int);
extern int sha1write(struct sha1file *, void *, unsigned int);
extern int sha1write_compressed(struct sha1file *, void *, unsigned int);
extern void crc32_begin(struct sha1file *);
extern uint32_t crc32_end(struct sha1file *);

#endif
back to top