#define ESI_HONOR_DOLLAR BIT(1) /* $ is meaningfull */
#define ESI_SKIPPING BIT(2) /* value will not be needed */
+#ifdef STAND_ALONE
+# ifndef SUPPORT_CRYPTEQ
+# define SUPPORT_CRYPTEQ
+# endif
+#else
+
/* Recursively called function */
static uschar *expand_string_internal(const uschar *, esi_flags, const uschar **, BOOL *, BOOL *);
static int_eximarith_t expanded_string_integer(const uschar *, BOOL);
-#ifdef STAND_ALONE
-# ifndef SUPPORT_CRYPTEQ
-# define SUPPORT_CRYPTEQ
-# endif
-#endif
+#endif /*!STAND_ALONE*/
#ifdef LOOKUP_LDAP
# include "lookups/ldap.h"
{ "warnmsg_recipients", vtype_stringptr, &warnmsg_recipients }
};
-static int var_table_size = nelem(var_table);
-
#ifdef MACRO_PREDEF
/* dummies */
find_var_ent(uschar * name)
{
int first = 0;
-int last = var_table_size;
+int last = nelem(var_table);
while (last > first)
{
switch(read_subs(sub_arg, nelem(sub_arg), 1, &s, flags, TRUE, name, &resetok, NULL))
{
+ case -1: continue; /* If skipping, we don't actually do anything */
case 1: goto EXPAND_FAILED_CURLY;
case 2:
case 3: goto EXPAND_FAILED;
}
- /*XXX no skipping-optimisation? */
yield = string_append(yield, 3,
US"Authentication-Results: ", sub_arg[0], US"; none");
case 2:
case 3: goto EXPAND_FAILED;
}
- /*XXX no skipping-optimisation? */
if (!sub_arg[1]) /* One argument */
{
switch(read_subs(sub_arg, 2, 1, &s, flags, TRUE, name, &resetok, NULL))
{
+ case -1: continue; /* If skipping, we don't actually do anything */
case 1: goto EXPAND_FAILED_CURLY;
case 2:
case 3: goto EXPAND_FAILED;
}
- /* If skipping, we don't actually do anything */
-
- if (flags & ESI_SKIPPING) continue;
-
/* Open the file and read it */
if (!(f = Ufopen(sub_arg[0], "rb")))
save_expand_strings(save_expand_nstring, save_expand_nlength);
/* Read the field & list arguments */
+ /*XXX Could we use read_subs here (and get better efficiency for skipping)? */
for (int i = 0; i < 2; i++)
{
#endif
/* check known-name variables */
-for (var_entry * v = var_table; v < var_table + var_table_size; v++)
+for (var_entry * v = var_table; v < var_table + nelem(var_table); v++)
if (v->type == vtype_stringptr)
assert_variable_notin(US v->name, *(USS v->value), &e);