mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-08-31 14:25:41 +00:00
Add line-oriented argument to new_parse(). Add new tokens.
This commit is contained in:
@@ -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"))
|
||||
|
Reference in New Issue
Block a user