X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=bfile%2Fcommit.c;h=0c9df27ed6cf424ff93076e783b8825abffe3c84;hb=85df66537199c30a492ad54be4fbe25fa77e18c8;hp=cbebe0e300e7701fc900cc6a1cc7f01835cc7acb;hpb=ed679affe3ae7402b38418f6b98fb8744915e19b;p=idzebra-moved-to-github.git diff --git a/bfile/commit.c b/bfile/commit.c index cbebe0e..0c9df27 100644 --- a/bfile/commit.c +++ b/bfile/commit.c @@ -4,7 +4,17 @@ * Sebastian Hammer, Adam Dickmeiss * * $Log: commit.c,v $ - * Revision 1.2 1995-12-01 11:37:24 adam + * Revision 1.5 1995-12-12 15:57:55 adam + * Implemented mf_unlink. cf_unlink uses mf_unlink. + * + * Revision 1.4 1995/12/11 09:03:55 adam + * New function: cf_unlink. + * New member of commit file head: state (0) deleted, (1) hash file. + * + * Revision 1.3 1995/12/01 16:24:29 adam + * Commit files use separate meta file area. + * + * Revision 1.2 1995/12/01 11:37:24 adam * Cached/commit files implemented as meta-files. * * Revision 1.1 1995/11/30 08:33:13 adam @@ -19,9 +29,22 @@ #include #include "cfile.h" +void cf_unlink (CFile cf) +{ + if (cf->bucket_in_memory) + { + logf (LOG_FATAL, "Cannot unlink potential dirty cache"); + exit (1); + } + cf->head.state = 0; + cf->dirty = 1; + mf_unlink (cf->block_mf); + mf_unlink (cf->hash_mf); +} + void cf_commit (CFile cf) { - int i, r, bucket_no; + int i, bucket_no; int hash_bytes; struct CFile_ph_bucket *p;