]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add line-oriented argument to new_parse(). Add new tokens.
authorTed Lemon <source@isc.org>
Wed, 2 May 2001 06:32:54 +0000 (06:32 +0000)
committerTed Lemon <source@isc.org>
Wed, 2 May 2001 06:32:54 +0000 (06:32 +0000)
common/conflex.c

index aa65e41784d487eb5f3baaa0d85b8bad6ffce9ef..495088ea9ec7c24e842c9ad32c0835ab233cf547 100644 (file)
@@ -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"))