]> git.ipfire.org Git - thirdparty/dhcp.git/blobdiff - common/tree.c
- Parameters configured to evaluate from user defined function calls can
[thirdparty/dhcp.git] / common / tree.c
index c30e086e7db956d8d738c19ffc8b7e0dc6ae918a..d09717d4283b2d7d549582eea4090d85c5ffc54e 100644 (file)
@@ -4029,6 +4029,27 @@ int write_expression (file, expr, col, indent, firstp)
                                         "gethostname()");
                break;
 
+             case expr_funcall:
+               col = token_print_indent(file, indent, indent, "", "",
+                                        expr->data.funcall.name);
+               col = token_print_indent(file, col, indent, " ", "", "(");
+
+               firstp = 1;
+               e = expr->data.funcall.arglist;
+               while (e != NULL) {
+                       if (!firstp)
+                               col = token_print_indent(file, col, indent,
+                                                        "", " ", ",");
+
+                       col = write_expression(file, e->data.arg.val, col,
+                                              indent, firstp);
+                       firstp = 0;
+                       e = e->data.arg.next;
+               }
+
+               col = token_print_indent(file, col, indent, "", "", ")");
+               break;
+
              default:
                log_fatal ("invalid expression type in print_expression: %d",
                           expr -> op);