diff options
author | Ted Lemon <source@isc.org> | 2001-03-01 18:17:09 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2001-03-01 18:17:09 +0000 |
commit | 0b69dcc8709461c9fd2bfa644d0d78b827d06ef3 (patch) | |
tree | 625bb174155b8af6b15b9c5f1745d5826ed43f71 /common | |
parent | 9f8b2a7f67edf5517bc8a203f7749b2c5ca7ef8e (diff) | |
download | isc-dhcp-0b69dcc8709461c9fd2bfa644d0d78b827d06ef3.tar.gz |
Change EOF to END_OF_FILE in tokenizer for enum compatibility.
Diffstat (limited to 'common')
-rw-r--r-- | common/conflex.c | 7 | ||||
-rw-r--r-- | common/parse.c | 10 | ||||
-rw-r--r-- | common/resolv.c | 6 |
3 files changed, 13 insertions, 10 deletions
diff --git a/common/conflex.c b/common/conflex.c index ba22e32b..51b06c10 100644 --- a/common/conflex.c +++ b/common/conflex.c @@ -3,7 +3,7 @@ Lexical scanner for dhcpd config file... */ /* - * Copyright (c) 1995-2000 Internet Software Consortium. + * Copyright (c) 1995-2001 Internet Software Consortium. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: conflex.c,v 1.88 2001/02/27 01:15:36 neild Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: conflex.c,v 1.89 2001/03/01 18:16:59 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -208,6 +208,9 @@ static enum dhcp_token get_token (cfile) cfile -> lexchar = p; ttok = read_num_or_name (c, cfile); break; + } else if (c == EOF) { + ttok = END_OF_FILE; + break; } else { cfile -> lexline = l; cfile -> lexchar = p; diff --git a/common/parse.c b/common/parse.c index dbe263a7..b3909e9c 100644 --- a/common/parse.c +++ b/common/parse.c @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: parse.c,v 1.100 2001/02/12 19:44:54 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; +"$Id: parse.c,v 1.101 2001/03/01 18:17:00 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -139,7 +139,7 @@ void skip_to_rbrace (cfile, brace_count) return; } token = next_token (&val, cfile); - } while (token != EOF); + } while (token != END_OF_FILE); } int parse_semi (cfile) @@ -461,7 +461,7 @@ unsigned char *parse_numeric_aggregate (cfile, buf, } token = next_token (&val, cfile); - if (token == EOF) { + if (token == END_OF_FILE) { parse_warn (cfile, "unexpected end of file"); break; } @@ -2333,7 +2333,7 @@ int parse_on_statement (result, cfile, lose) /* Try to even things up. */ do { token = next_token (&val, cfile); - } while (token != EOF && token != RBRACE); + } while (token != END_OF_FILE && token != RBRACE); executable_statement_dereference (result, MDL); return 0; } @@ -2525,7 +2525,7 @@ int parse_if_statement (result, cfile, lose) /* Try to even things up. */ do { token = next_token (&val, cfile); - } while (token != EOF && token != RBRACE); + } while (token != END_OF_FILE && token != RBRACE); executable_statement_dereference (result, MDL); return 0; } diff --git a/common/resolv.c b/common/resolv.c index 4c302bb2..051a672b 100644 --- a/common/resolv.c +++ b/common/resolv.c @@ -3,7 +3,7 @@ Parser for /etc/resolv.conf file. */ /* - * Copyright (c) 1996-2000 Internet Software Consortium. + * Copyright (c) 1996-2001 Internet Software Consortium. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,7 +43,7 @@ #ifndef lint static char copyright[] = -"$Id: resolv.c,v 1.13 2000/03/17 03:59:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n"; +"$Id: resolv.c,v 1.14 2001/03/01 18:17:02 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n"; #endif /* not lint */ #include "dhcpd.h" @@ -75,7 +75,7 @@ void read_resolv_conf (parse_time) do { token = next_token (&val, cfile); - if (token == EOF) + if (token == END_OF_FILE) break; else if (token == EOL) continue; |