]>
diplodocus.org Git - nmh/blob - sbr/folder_free.c
1 /* folder_free.c -- free a folder/message structure
3 * This code is Copyright (c) 2002, by the authors of nmh. See the
4 * COPYRIGHT file in the root directory of the nmh distribution for
5 * complete copyright information.
10 #include "lock_file.h"
14 folder_free (struct msgs
*mp
)
24 /* free the sequence names */
25 for (i
= 0; i
< svector_size (mp
->msgattrs
); i
++)
26 free (svector_at (mp
->msgattrs
, i
));
27 svector_free (mp
->msgattrs
);
29 for (i
= 0, v
= mp
->msgstats
; i
< mp
->num_msgstats
; ++i
, ++v
) {
34 /* Close/free the sequence file if it is open */
37 lkfclosedata (mp
->seqhandle
, mp
->seqname
);
41 bvector_free (mp
->attrstats
);
42 free (mp
); /* free main folder structure */