Lines Matching defs:current
59 static int cil_fill_list(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **list)
69 rc = __cil_verify_syntax(current, syntax, syntax_len);
76 for (curr = current; curr != NULL; curr = curr->next) {
2603 static int __cil_fill_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr);
2605 static int __cil_fill_expr_helper(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr)
2610 op = __cil_get_expr_operator_flavor(current->data);
2612 rc = cil_verify_expr_syntax(current, op, flavor);
2619 current = current->next;
2622 for (;current != NULL; current = current->next) {
2623 rc = __cil_fill_expr(current, flavor, expr);
2635 static int __cil_fill_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list *expr)
2639 if (current->cl_head == NULL) {
2640 enum cil_flavor op = __cil_get_expr_operator_flavor(current->data);
2642 cil_log(CIL_ERR, "Operator (%s) not in an expression\n", (char*)current->data);
2645 cil_list_append(expr, CIL_STRING, current->data);
2649 rc = __cil_fill_expr_helper(current->cl_head, flavor, sub_expr);
2664 int cil_gen_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr)
2670 if (current->cl_head == NULL) {
2671 rc = __cil_fill_expr(current, flavor, *expr);
2673 rc = __cil_fill_expr_helper(current->cl_head, flavor, *expr);
2716 static int __cil_fill_constraint_leaf_expr(struct cil_tree_node *current, enum cil_flavor expr_flavor, enum cil_flavor op, struct cil_list **leaf_expr)
2723 l_flavor = __cil_get_constraint_operand_flavor(current->next->data);
2724 r_flavor = __cil_get_constraint_operand_flavor(current->next->next->data);
2749 cil_log(CIL_ERR, "Invalid left operand (%s)\n", (char*)current->next->data);
2765 cil_list_append(*leaf_expr, CIL_STRING, current->next->next->data);
2768 rc = cil_fill_list(current->next->next->cl_head, leaf_expr_flavor, &sub_list);
2785 static int __cil_fill_constraint_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr)
2792 if (current->data == NULL || current->cl_head != NULL) {
2797 op = __cil_get_constraint_operator_flavor(current->data);
2799 rc = cil_verify_constraint_expr_syntax(current, op);
2810 rc = __cil_fill_constraint_leaf_expr(current, flavor, op, expr);
2816 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr);
2825 rc = __cil_fill_constraint_expr(current->next->cl_head, flavor, &lexpr);
2829 rc = __cil_fill_constraint_expr(current->next->next->cl_head, flavor, &rexpr);
2847 static int cil_gen_constraint_expr(struct cil_tree_node *current, enum cil_flavor flavor, struct cil_list **expr)
2851 if (current->cl_head == NULL) {
2855 rc = __cil_fill_constraint_expr(current->cl_head, flavor, expr);
5340 //walk current list and check for duplicate parameters