CONF_SECTION *current; //!< sub-section we're reading
CONF_SECTION *assignment_only; //!< map / update section
- bool require_edits; //!< are we required to do edits?
-
int braces;
bool from_dir; //!< this file was read from $include foo/
} cf_stack_frame_t;
return -1;
}
value = buff[2];
-
goto alloc_pair;
}
* allow it everywhere.
*/
if (*ptr == '{') {
- if ((parent->unlang == CF_UNLANG_NONE) && !frame->require_edits) {
+ if ((parent->unlang != CF_UNLANG_ALLOW) && (parent->unlang != CF_UNLANG_EDIT)) {
ERROR("%s[%d]: Parse error: Invalid location for grouped attribute",
frame->filename, frame->lineno);
return -1;
* situation later.
*/
value = NULL;
- frame->require_edits = true;
goto alloc_section;
}
*
* If it's not an "update" section, and it's an "edit" thing, then try to parse an expression.
*/
- if (!frame->assignment_only && (frame->require_edits || (*buff[1] == '&'))) {
+ if (!frame->assignment_only && ((parent->unlang == CF_UNLANG_EDIT) || (*buff[1] == '&'))) {
bool eol;
ssize_t slen;
char const *ptr2 = ptr;
frame->lineno = 0;
frame->from_dir = true;
frame->assignment_only = NULL; /* can't do includes inside of update / map */
- frame->require_edits = stack->frame[stack->depth - 1].require_edits;
return 1;
}