2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-08-30 22:05:23 +00:00

Add support for arbitrary parenthetical expressions.

This commit is contained in:
Ted Lemon
2000-07-06 09:57:23 +00:00
parent fd5cbc1eb9
commit fcd9651fd7

View File

@@ -43,7 +43,7 @@
#ifndef lint
static char copyright[] =
"$Id: parse.c,v 1.76 2000/06/29 20:05:18 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
"$Id: parse.c,v 1.77 2000/07/06 09:57:23 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
@@ -2441,6 +2441,26 @@ int parse_non_binary (expr, cfile, lose, context)
}
break;
case LPAREN:
token = next_token (&val, cfile);
if (!parse_expression (expr, cfile, lose, context,
(struct expression **)0, expr_none)) {
if (!*lose) {
parse_warn (cfile, "expression expected");
skip_to_semi (cfile);
}
*lose = 1;
return 0;
}
token = next_token (&val, cfile);
if (token != RPAREN) {
*lose = 1;
parse_warn (cfile, "right paren expected");
skip_to_semi (cfile);
return 0;
}
break;
case EXISTS:
if (context == context_dns)
goto ns_exists;