else
printf("&p%d,", mp_index-1);
-printf(" FALSE, %d, \"%s\", \"y\" };\n", Ustrlen(name), name);
+printf(" FALSE, %d, \"%s\", \"y\" };\n", Ustrlen(name), CS name);
mp_index++;
}
-static void
+void
spf(uschar * buf, int len, const uschar * fmt, ...)
{
va_list ap;
for (i = 0; i < nopt; i++) if (*(s = US opts[i].name) && *s != '*')
{
if (group)
- spf(buf, sizeof(buf), "_OPT_%T_%T_%T", section, group, s);
+ spf(buf, sizeof(buf), CUS"_OPT_%T_%T_%T", section, group, s);
else
- spf(buf, sizeof(buf), "_OPT_%T_%T", section, s);
+ spf(buf, sizeof(buf), CUS"_OPT_%T_%T", section, s);
builtin_macro_create(buf);
}
}
printf("macro_item * macros = &p%d;\n", mp_index-1);
printf("macro_item * mlast = &p0;\n");
+exit(0);
}
/* Global functions */
+extern void spf(uschar *, int, const uschar *, ...);
extern void builtin_macro_create(const uschar *);
extern void options_from_list(optionlist *, unsigned, const uschar *, uschar *);
for (ai = auths_available; ai->driver_name[0]; ai++)
{
- snprintf(buf, sizeof(buf), "_DRIVER_AUTHENTICATOR_%T", ai->driver_name);
+ spf(buf, sizeof(buf), "_DRIVER_AUTHENTICATOR_%T", ai->driver_name);
builtin_macro_create(buf);
options_from_list(ai->options, (unsigned)*ai->options_count, US"AUTHENTICATOR", ai->driver_name);
}
for (ri = routers_available; ri->driver_name[0]; ri++)
{
- snprintf(buf, sizeof(buf), "_DRIVER_ROUTER_%T", ri->driver_name);
+ spf(buf, sizeof(buf), "_DRIVER_ROUTER_%T", ri->driver_name);
builtin_macro_create(buf);
options_from_list(ri->options, (unsigned)*ri->options_count, US"ROUTER", ri->driver_name);
}
for (ti = transports_available; ti->driver_name[0]; ti++)
{
- snprintf(buf, sizeof(buf), "_DRIVER_TRANSPORT_%T", ti->driver_name);
+ spf(buf, sizeof(buf), "_DRIVER_TRANSPORT_%T", ti->driver_name);
builtin_macro_create(buf);
options_from_list(ti->options, (unsigned)*ti->options_count, US"TRANSPORT", ti->driver_name);
}