]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Add keywords supersede, search, prepend, nameserver, domain, append. Add support...
authorTed Lemon <source@isc.org>
Fri, 9 May 1997 07:57:54 +0000 (07:57 +0000)
committerTed Lemon <source@isc.org>
Fri, 9 May 1997 07:57:54 +0000 (07:57 +0000)
common/conflex.c

index 4bf5e6638530208d6bf76849a9b4f52b6395aa5e..64cc8eb3ff81a92af1b78f63fe2ca7323b219680 100644 (file)
@@ -42,7 +42,7 @@
 
 #ifndef lint
 static char copyright[] =
-"$Id: conflex.c,v 1.25 1997/03/29 01:24:53 mellon Exp $ Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.  All rights reserved.\n";
+"$Id: conflex.c,v 1.26 1997/05/09 07:57:54 mellon Exp $ Copyright (c) 1995, 1996, 1997 The Internet Software Consortium.  All rights reserved.\n";
 #endif /* not lint */
 
 #include "dhcpd.h"
@@ -55,6 +55,7 @@ char *token_line;
 char *prev_line;
 char *cur_line;
 char *tlname;
+int eol_token;
 
 static char line1 [81];
 static char line2 [81];
@@ -141,7 +142,7 @@ static int get_token (cfile)
                        comments [comment_index++] = '\n';
 #endif
 
-               if (isascii (c) && isspace (c))
+               if (!(c == '\n' && eol_token) && isascii (c) && isspace (c))
                        continue;
                if (c == '#') {
 #ifdef OLD_LEXER
@@ -353,6 +354,8 @@ static int intern (atom, dfv)
 
        switch (tolower (atom [0])) {
              case 'a':
+               if (!strcasecmp (atom + 1, "ppend"))
+                       return APPEND;
                if (!strcasecmp (atom + 1, "llow"))
                        return ALLOW;
                if (!strcasecmp (atom + 1, "lias"))
@@ -378,6 +381,8 @@ static int intern (atom, dfv)
                        return CLIENT_IDENTIFIER;
                break;
              case 'd':
+               if (!strcasecmp (atom + 1, "omain"))
+                       return DOMAIN;
                if (!strcasecmp (atom + 1, "eny"))
                        return DENY;
                if (!strncasecmp (atom + 1, "efault", 6)) {
@@ -447,6 +452,8 @@ static int intern (atom, dfv)
                }
                break;
              case 'n':
+               if (!strcasecmp (atom + 1, "ameserver"))
+                       return NAMESERVER;
                if (!strcasecmp (atom + 1, "etmask"))
                        return NETMASK;
                if (!strcasecmp (atom + 1, "ext-server"))
@@ -459,6 +466,8 @@ static int intern (atom, dfv)
                        return ONE_LEASE_PER_CLIENT;
                break;
              case 'p':
+               if (!strcasecmp (atom + 1, "repend"))
+                       return PREPEND;
                if (!strcasecmp (atom + 1, "acket"))
                        return PACKET;
                break;
@@ -479,6 +488,8 @@ static int intern (atom, dfv)
                        return REBOOT;
                break;
              case 's':
+               if (!strcasecmp (atom + 1, "earch"))
+                       return SEARCH;
                if (!strcasecmp (atom + 1, "tarts"))
                        return STARTS;
                if (!strcasecmp (atom + 1, "iaddr"))
@@ -497,6 +508,8 @@ static int intern (atom, dfv)
                        return SEND;
                if (!strcasecmp (atom + 1, "cript"))
                        return SCRIPT;
+               if (!strcasecmp (atom + 1, "upersede"))
+                       return SUPERSEDE;
                break;
              case 't':
                if (!strcasecmp (atom + 1, "imestamp"))