CONF_SECTION *parent; //!< which started this file
CONF_SECTION *current; //!< sub-section we're reading
- CONF_SECTION *special; //!< map / update section
+ CONF_SECTION *assignment_only; //!< map / update section
bool require_edits; //!< are we required to do edits?
/*
* Can't do this inside of update / map.
*/
- if (frame->special) {
+ if (frame->assignment_only) {
ERROR("%s[%d]: Parse error: Invalid location for $INCLUDE",
frame->filename, frame->lineno);
return -1;
frame->required = required;
frame->parent = parent;
frame->current = parent;
- frame->special = NULL;
+ frame->assignment_only = NULL;
/*
* For better debugging.
frame->parent = parent;
frame->current = parent;
frame->filename = talloc_strdup(frame->parent, value);
- frame->special = NULL;
+ frame->assignment_only = NULL;
return 1;
}
/*
* No "$INCLUDE dir/" inside of update / map. That's dumb.
*/
- frame->special = NULL;
+ frame->assignment_only = NULL;
return 1;
}
#else
css->argc++;
}
stack->ptr = ptr;
- frame->special = css;
+ frame->assignment_only = css;
return cf_section_to_item(css);
}
}
stack->ptr = ptr;
- frame->special = css;
+ frame->assignment_only = css;
css->allow_unlang = css->allow_locals = true;
return cf_section_to_item(css);
talloc_free(name2);
stack->ptr = ptr;
- frame->special = css;
return cf_section_to_item(css);
}
*/
if (!cf_template_merge(parent, parent->template)) return -1;
- if (parent == frame->special) frame->special = NULL;
+ if (parent == frame->assignment_only) frame->assignment_only = NULL;
frame->current = cf_item_to_section(parent->item.parent);
* should really be put into a parser
* struct, as with tmpls.
*/
- if (!frame->special && (strcmp(css->name1, "update") == 0)) {
- frame->special = css;
+ if (!frame->assignment_only && (strcmp(css->name1, "update") == 0)) {
+ frame->assignment_only = css;
}
/*
/*
* As a hack, allow any operators when using &foo=bar
*/
- if (!frame->special && (buff[1][0] != '&')) {
+ if (!frame->assignment_only && (buff[1][0] != '&')) {
ERROR("%s[%d]: Invalid operator in assignment for %s ...",
frame->filename, frame->lineno, buff[1]);
return -1;
*
* If it's not an "update" section, and it's an "edit" thing, then try to parse an expression.
*/
- if (!frame->special && (frame->require_edits || (*buff[1] == '&'))) {
+ if (!frame->assignment_only && (frame->require_edits || (*buff[1] == '&'))) {
bool eol;
ssize_t slen;
char const *ptr2 = ptr;
frame->filename = h->filename;
frame->lineno = 0;
frame->from_dir = true;
- frame->special = NULL; /* can't do includes inside of update / map */
+ frame->assignment_only = NULL; /* can't do includes inside of update / map */
frame->require_edits = stack->frame[stack->depth - 1].require_edits;
return 1;
}