|
|
The following functions are used to obtain structures from free storage and to release them:
ENVELOPE *mail_newenvelope (void);
ADDRESS *mail_newaddr (void);
BODY *mail_newbody (void);
BODY *mail_initbody (BODY *body);
PARAMETER *mail_newbody_parameter (void);
PART *mail_newbody_part (void);
STRINGLIST *mail_newstringlist (void);
SEARCHPGM *mail_newsearchpgm (void);
SEARCHHEADER *mail_newsearchheader (char *line);
SEARCHSET *mail_newsearchset (void);
SEARCHOR *mail_newsearchor (void);
SEARCHPGMLIST *mail_newsearchpgmlist (void);
SORTPGM *mail_newsortpgm (void);
The following functions, all named mail_free_*, take a pointer to a structure pointer, free all contained strings and structures within the structure, and finally free the structure itself and set its pointer to NIL. For example, mail_free_envelope frees all the ADDRESS structures contained in the envelope.
void mail_free_body(BODY **body);
void mail_free_body_parameter(PARAMETER **parameter);
void mail_free_body_part(PART **part);
void mail_free_cache(MAILSTREAM *stream);
void mail_free_elt(MESSAGECACHE **elt);
void mail_free_lelt(LONGCACHE **lelt);
void mail_free_envelope(ENVELOPE **env);
void mail_free_address(ADDRESS **address);
void mail_free_stringlist(STRINGLIST **string);
void mail_free_searchpgm(SEARCHPGM **pgm);
void mail_free_searchheader(SEARCHHEADER **hdr);
void mail_free_searchset(SEARCHSET **set);
void mail_free_searchor(SEARCHOR **orl);
void mail_free_searchpgmlist(SEARCHPGMLIST **pgl);
void mail_free_sortpgm(SORTPGM **pgm);