"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/gram.c" between
mailfromd-8.11.tar.xz and mailfromd-8.12.tar.xz

About: Mailfromd is a general-purpose mail filtering daemon for Sendmail, Postfix and MeTA1 (interfaces with the MTA using Milter or PMilter protocols).

gram.c  (mailfromd-8.11.tar.xz):gram.c  (mailfromd-8.12.tar.xz)
skipping to change at line 6789 skipping to change at line 6789
mu_locus_range_init (&dv->locus); mu_locus_range_init (&dv->locus);
if (locus) if (locus)
mu_locus_range_copy (&dv->locus, locus); mu_locus_range_copy (&dv->locus, locus);
dv->val = *val; dv->val = *val;
declvar = dv; declvar = dv;
var->sym.flags |= SYM_INITIALIZED; var->sym.flags |= SYM_INITIALIZED;
return 0; return 0;
} }
void void
ensure_initialized_variable(const char *name, struct value *val) ds_init_variable(const char *name, void *data)
{ {
struct declvar *dv; struct declvar *dv;
struct variable *var = variable_lookup(name); struct variable *var = variable_lookup(name);
if (!var) { if (!var) {
mu_error(_("INTERNAL ERROR at %s:%d: variable to be " mu_error(_("INTERNAL ERROR at %s:%d: variable to be "
"initialized is not declared"), "initialized is not declared"),
__FILE__, __LINE__); __FILE__, __LINE__);
abort(); abort();
} }
if (var->type != val->type)
mu_error(_("INTERNAL ERROR at %s:%d: variable to be "
"initialized has wrong type"),
__FILE__, __LINE__);
for (dv = declvar; dv; dv = dv->next) for (dv = declvar; dv; dv = dv->next)
if (dv->var == var) if (dv->var == var)
return; return;
dv = mu_alloc(sizeof *dv); dv = mu_alloc(sizeof *dv);
mu_locus_range_init (&dv->locus); mu_locus_range_init(&dv->locus);
dv->var = var; dv->var = var;
dv->val = *val;
dv->next = declvar; dv->next = declvar;
declvar = dv; declvar = dv;
switch (var->type) {
case dtype_string:
dv->val.v.literal = string_alloc(data, strlen(data));
break;
case dtype_number:
dv->val.v.number = *(long*)data;
break;
default:
mu_error(_("INTERNAL ERROR at %s:%d: variable to be "
"initialized has wrong type"),
__FILE__, __LINE__);
abort ();
}
dv->val.type = var->type;
} }
static int static int
_ds_variable_count_fun(void *sym, void *data) _ds_variable_count_fun(void *sym, void *data)
{ {
struct variable *var = sym; struct variable *var = sym;
if ((var->sym.flags & (SYM_VOLATILE | SYM_REFERENCED)) if ((var->sym.flags & (SYM_VOLATILE | SYM_REFERENCED))
&& !(var->sym.flags & SYM_PASSTOGGLE)) { && !(var->sym.flags & SYM_PASSTOGGLE)) {
var->sym.flags |= SYM_PASSTOGGLE; var->sym.flags |= SYM_PASSTOGGLE;
 End of changes. 6 change blocks. 
7 lines changed or deleted 21 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)