Parser for dhclient config and lease files... */
/*
- * 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
#ifndef lint
static char copyright[] =
-"$Id: clparse.c,v 1.56 2001/02/26 22:21:02 mellon Exp $ Copyright (c) 1996-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: clparse.c,v 1.57 2001/03/01 18:16:57 mellon Exp $ Copyright (c) 1996-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
0
};
-/* client-conf-file :== client-declarations EOF
+/* client-conf-file :== client-declarations END_OF_FILE
client-declarations :== <nil>
| client-declaration
| client-declarations client-declaration */
do {
token = peek_token (&val, cfile);
- if (token == EOF)
+ if (token == END_OF_FILE)
break;
parse_client_statement (cfile,
(struct interface_info *)0,
return status;
}
-/* lease-file :== client-lease-statements EOF
+/* lease-file :== client-lease-statements END_OF_FILE
client-lease-statements :== <nil>
| client-lease-statements LEASE client-lease-statement */
do {
token = next_token (&val, cfile);
- if (token == EOF)
+ if (token == END_OF_FILE)
break;
if (token != LEASE) {
log_error ("Corrupt lease file - possible data loss!");
do {
token = peek_token (&val, cfile);
- if (token == EOF) {
+ if (token == END_OF_FILE) {
parse_warn (cfile,
"unterminated interface declaration.");
return;
do {
token = peek_token (&val, cfile);
- if (token == EOF) {
+ if (token == END_OF_FILE) {
parse_warn (cfile, "unterminated lease declaration.");
return;
}
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
#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"
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;
#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"
return;
}
token = next_token (&val, cfile);
- } while (token != EOF);
+ } while (token != END_OF_FILE);
}
int parse_semi (cfile)
}
token = next_token (&val, cfile);
- if (token == EOF) {
+ if (token == END_OF_FILE) {
parse_warn (cfile, "unexpected end of file");
break;
}
/* 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;
}
/* 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;
}
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
#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"
do {
token = next_token (&val, cfile);
- if (token == EOF)
+ if (token == END_OF_FILE)
break;
else if (token == EOL)
continue;
-/* omapictl.c
+/* omshell.c
Examine and modify omapi objects. */
parse_warn (cfile, "unknown token: %s", val);
break;
- case EOF:
+ case END_OF_FILE:
break;
case TOKEN_HELP:
case TOKEN_NEW:
token = next_token (&val, cfile);
if ((!is_identifier (token) && token != STRING) ||
- next_token (NULL, cfile) != EOF)
+ next_token (NULL, cfile) != END_OF_FILE)
{
printf ("usage: new <object-type>\n");
break;
break;
case TOKEN_CLOSE:
- if (next_token (NULL, cfile) != EOF) {
+ if (next_token (NULL, cfile) != END_OF_FILE) {
printf ("usage: close\n");
}
case TOKEN_CREATE:
case TOKEN_OPEN:
- if (next_token (NULL, cfile) != EOF) {
+ if (next_token (NULL, cfile) != END_OF_FILE) {
printf ("usage: %s\n", val);
}
break;
case UPDATE:
- if (next_token (NULL, cfile) != EOF) {
+ if (next_token (NULL, cfile) != END_OF_FILE) {
printf ("usage: %s\n", val);
}
TOKEN_CLOSE = 603,
TOKEN_CREATE = 604,
TOKEN_OPEN = 605,
- TOKEN_HELP = 606
+ TOKEN_HELP = 606,
+ END_OF_FILE = 607
};
#define is_identifier(x) ((x) >= FIRST_TOKEN && \
Parser 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
#ifndef lint
static char copyright[] =
-"$Id: confpars.c,v 1.133 2001/02/12 21:59:30 mellon Exp $ Copyright (c) 1995-2000 The Internet Software Consortium. All rights reserved.\n";
+"$Id: confpars.c,v 1.134 2001/03/01 18:17:07 mellon Exp $ Copyright (c) 1995-2001 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */
#include "dhcpd.h"
}
#endif
-/* conf-file :== parameters declarations EOF
+/* conf-file :== parameters declarations END_OF_FILE
parameters :== <nil> | parameter | parameters parameter
declarations :== <nil> | declaration | declarations declaration */
void trace_conf_stop (trace_type_t *ttype) { }
#endif
-/* conf-file :== parameters declarations EOF
+/* conf-file :== parameters declarations END_OF_FILE
parameters :== <nil> | parameter | parameters parameter
declarations :== <nil> | declaration | declarations declaration */
do {
token = peek_token (&val, cfile);
- if (token == EOF)
+ if (token == END_OF_FILE)
break;
declaration = parse_statement (cfile, group, group_type,
(struct host_decl *)0,
return status;
}
-/* lease-file :== lease-declarations EOF
+/* lease-file :== lease-declarations END_OF_FILE
lease-statments :== <nil>
| lease-declaration
| lease-declarations lease-declaration */
do {
token = next_token (&val, cfile);
- if (token == EOF)
+ if (token == END_OF_FILE)
break;
if (token == LEASE) {
struct lease *lease = (struct lease *)0;
token = next_token (&val, cfile);
break;
}
- if (token == EOF) {
+ if (token == END_OF_FILE) {
token = next_token (&val, cfile);
parse_warn (cfile, "unexpected end of file");
break;
if (token == RBRACE) {
token = next_token (&val, cfile);
break;
- } else if (token == EOF) {
+ } else if (token == END_OF_FILE) {
token = next_token (&val, cfile);
parse_warn (cfile, "unexpected end of file");
break;
enter_shared_network (share);
shared_network_dereference (&share, MDL);
return;
- } else if (token == EOF) {
+ } else if (token == END_OF_FILE) {
token = next_token (&val, cfile);
parse_warn (cfile, "unexpected end of file");
break;
if (token == RBRACE) {
token = next_token (&val, cfile);
break;
- } else if (token == EOF) {
+ } else if (token == END_OF_FILE) {
token = next_token (&val, cfile);
parse_warn (cfile, "unexpected end of file");
break;
if (token == RBRACE) {
token = next_token (&val, cfile);
break;
- } else if (token == EOF) {
+ } else if (token == END_OF_FILE) {
token = next_token (&val, cfile);
parse_warn (cfile, "unexpected end of file");
break;
token = next_token (&val, cfile);
if (token == RBRACE)
break;
- else if (token == EOF) {
+ else if (token == END_OF_FILE) {
parse_warn (cfile, "unexpected end of file");
break;
}