]> git.lizzy.rs Git - plan9front.git/blob - sys/src/cmd/hgfs/fns.h
upas/fs: fix more locking bugs, remove debugging clutter, remove planb mbox code
[plan9front.git] / sys / src / cmd / hgfs / fns.h
1 /* hash */
2 int Hfmt(Fmt *f);
3 int hex2hash(char *s, uchar *h);
4 uvlong hash2qid(uchar *h);
5 int fhash(int fd, uchar p1[], uchar p2[], uchar h[]);
6 int readhash(char *path, char *name, uchar hash[]);
7
8 /* patch */
9 int fcopy(int dfd, int sfd, vlong off, vlong len);
10 int fpatchmark(int pfd, char *mark);
11 int fpatch(int ofd, int bfd, int pfd);
12
13 /* zip */
14 int funzip(int ofd, int zfd, int len);
15
16 /* revlog */
17 int fmktemp(void);
18 int revlogopen(Revlog *r, char *path, int mode);
19 void revlogupdate(Revlog *r);
20 void revlogclose(Revlog *r);
21 int revlogextract(Revlog *r, int rev, int ofd);
22 uchar *revhash(Revlog *r, int rev);
23 int hashrev(Revlog *r, uchar hash[]);
24 int revlogopentemp(Revlog *r, int rev);
25 int fmetaheader(int fd);
26
27 /* info */
28 Revinfo *loadrevinfo(Revlog *changelog, int rev);
29
30 /* tree */
31 char *nodepath(char *s, char *e, Revnode *nd, int mangle);
32 Revnode *mknode(char *name, uchar *hash, char mode);
33 Revtree *loadfilestree(Revlog *changelog, Revlog *manifest, Revinfo *ri);
34 Revtree *loadchangestree(Revlog *changelog, Revlog *manifest, Revinfo *ri);
35 void closerevtree(Revtree *t);
36
37 /* util */
38 ulong hashstr(char *s);
39 int getworkdir(char *work, char *path);
40 int readfile(char *path, char *buf, int nbuf);
41
42 /* ancestor */
43 void ancestor(char *mtpt, uchar xhash[], uchar yhash[], uchar ahash[]);