Revision a2ef9d633f67edc227b00209d5b72ec388388877 authored by J. Bruce Fields on 19 August 2007, 02:16:24 UTC, committed by J. Bruce Fields on 26 August 2007, 14:35:16 UTC
Use the word "commit" as a synonym for "version" from the start.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
1 parent a5f90f3
Raw File
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