]>
diplodocus.org Git - nmh/blob - sbr/folder_free.c
3 * folder_free.c -- free a folder/message structure
5 * This code is Copyright (c) 2002, by the authors of nmh. See the
6 * COPYRIGHT file in the root directory of the nmh distribution for
7 * complete copyright information.
15 folder_free (struct msgs
*mp
)
23 mh_xfree(mp
->foldpath
);
25 /* free the sequence names */
26 for (i
= 0; i
< svector_size (mp
->msgattrs
); i
++)
27 free (svector_at (mp
->msgattrs
, i
));
28 svector_free (mp
->msgattrs
);
30 for (i
= 0, v
= mp
->msgstats
; i
< mp
->num_msgstats
; ++i
, ++v
) {
35 /* Close/free the sequence file if it is open */
38 lkfclosedata (mp
->seqhandle
, mp
->seqname
);
40 mh_xfree(mp
->seqname
);
42 bvector_free (mp
->attrstats
);
43 free (mp
); /* free main folder structure */