ec_interpolate_add_reqs

March 26, 2020 Contributors

Name

ec_interpolate_add_reqs — Add a set of requirements to an interpolation context

Synopsis

#include "misc/expand_string.h"

| void **ec_interpolate_add_reqs** ( | ctx, |   |
|   | reqs); |   |

ec_interpolate_context * <var class="pdparam">ctx</var>;
int <var class="pdparam">reqs</var>;

Description

Add a set of requirements to an interpolation context.

A macro implementation would use this to hint at the kind of environment needed for expansion of the string at runtime.

The potential requirements can be discovered using ec_interpolate_calc_deps. The requirements are as follows:

#define EC_INTERPOLATE_REQ_MSG      1  /* an ec_message */
#define EC_INTERPOLATE_REQ_MSG_BODY 2  /* body content */
#define EC_INTERPOLATE_REQ_MSG_HDRS 4  /* rfc2822_context */
#define EC_INTERPOLATE_REQ_VCTX     8  /* validate_context */
#define EC_INTERPOLATE_REQ_AC       16 /* accept_construct */

Parameters

ctx

The interpolation context. For a description of this data type see ec_interpolate_context.

reqs

This parameter can be any combination of the following:

#define EC_INTERPOLATE_REQ_MSG      1  /* an ec_message */
#define EC_INTERPOLATE_REQ_MSG_BODY 2  /* body content */
#define EC_INTERPOLATE_REQ_MSG_HDRS 4  /* rfc2822_context */
#define EC_INTERPOLATE_REQ_VCTX     8  /* validate_context */
#define EC_INTERPOLATE_REQ_AC       16 /* accept_construct */

Return Values

This function returns void.

Threading

It is legal to call this function in any thread.

See Also

ec_interpolate_string