From: Ted Lemon Date: Wed, 2 May 2001 06:32:54 +0000 (+0000) Subject: Add line-oriented argument to new_parse(). Add new tokens. X-Git-Tag: V3-RC5~37 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24f9d67e03f5e844a2e59e06c17eaa14289e6838;p=thirdparty%2Fdhcp.git Add line-oriented argument to new_parse(). Add new tokens. --- diff --git a/common/conflex.c b/common/conflex.c index aa65e4178..495088ea9 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.91 2001/04/20 18:07:25 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.92 2001/05/02 06:32:54 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -57,12 +57,13 @@ static enum dhcp_token read_number PROTO ((int, struct parse *)); static enum dhcp_token read_num_or_name PROTO ((int, struct parse *)); static enum dhcp_token intern PROTO ((char *, enum dhcp_token)); -isc_result_t new_parse (cfile, file, inbuf, buflen, name) +isc_result_t new_parse (cfile, file, inbuf, buflen, name, eolp) struct parse **cfile; int file; char *inbuf; unsigned buflen; const char *name; + int eolp; { struct parse *tmp; @@ -80,6 +81,7 @@ isc_result_t new_parse (cfile, file, inbuf, buflen, name) tmp -> cur_line [0] = tmp -> prev_line [0] = 0; tmp -> warnings_occurred = 0; tmp -> file = file; + tmp -> eol_token = eolp; tmp -> bufix = 0; tmp -> buflen = buflen; @@ -588,8 +590,10 @@ static enum dhcp_token intern (atom, dfv) if (!strcasecmp (atom + 6, "s")) return CLIENTS; } - if (!strncasecmp (atom + 1, "oncat", 5)) + if (!strcasecmp (atom + 1, "oncat")) return CONCAT; + if (!strcasecmp (atom + 1, "onnect")) + return CONNECT; if (!strcasecmp (atom + 1, "ommunications-interrupted")) return COMMUNICATIONS_INTERRUPTED; if (!strcasecmp (atom + 1, "ltt")) @@ -952,6 +956,8 @@ static enum dhcp_token intern (atom, dfv) return SERVER_NAME; if (!strcasecmp (atom + 1, "erver-identifier")) return SERVER_IDENTIFIER; + if (!strcasecmp (atom + 1, "erver")) + return SERVER; if (!strcasecmp (atom + 1, "elect-timeout")) return SELECT_TIMEOUT; if (!strcasecmp (atom + 1, "elect"))