/*++ /* NAME /* cleanup_body_edit 3 /* SUMMARY /* edit body content /* SYNOPSIS /* #include "cleanup.h" /* /* int cleanup_body_edit_start(state) /* CLEANUP_STATE *state; /* /* int cleanup_body_edit_write(state, type, buf) /* CLEANUP_STATE *state; /* int type; /* VSTRING *buf; /* /* int cleanup_body_edit_finish(state) /* CLEANUP_STATE *state; /* /* void cleanup_body_edit_free(state) /* CLEANUP_STATE *state; /* DESCRIPTION /* This module maintains queue file regions with body content. /* Regions are created on the fly, and can be reused multiple /* times. This module must not be called until the queue file /* is complete, and there must be no other read/write access /* to the queue file between the cleanup_body_edit_start() and /* cleanup_body_edit_finish() calls. /* /* cleanup_body_edit_start() performs initialization and sets /* the queue file write pointer to the start of the first body /* region. /* /* cleanup_body_edit_write() adds a queue file record to the /* queue file. When the current body region fills up, some /* unused region is reused, or a new region is created. /* /* cleanup_body_edit_finish() makes some final adjustments /* after the last body content record is written. /* /* cleanup_body_edit_free() frees up memory that was allocated /* by cleanup_body_edit_start() and cleanup_body_edit_write(). /* /* Arguments: /* .IP state /* Queue file and message processing state. This state is updated /* as records are processed and as errors happen. /* .IP type /* Record type. /* .IP buf /* Record content. /* LICENSE /* .ad /* .fi /* The Secure Mailer license must be distributed with this software. /* AUTHOR(S) /* Wietse Venema /* IBM T.J. Watson Research /* P.O. Box 704 /* Yorktown Heights, NY 10598, USA /* /* Wietse Venema /* Google, Inc. /* 111 8th Avenue /* New York, NY 10011, USA
/*--*/
/* *Sanitycheck.
*/ if (curr_rp->len > 0
&& curr_rp->write_offs > curr_rp->start + curr_rp->len)
msg_panic("%s: write past end of body segment", myname);
return (0);
}
/* cleanup_body_edit_finish - wrap up body region pool */
int cleanup_body_edit_finish(CLEANUP_STATE *state)
{
CLEANUP_REGION *curr_rp = state->curr_body_region;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.