2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-04 00:05:30 +00:00

int -> enum dhcp_token, where appropriate.

This commit is contained in:
Ted Lemon
1999-04-08 17:46:15 +00:00
parent ab2919edc5
commit 104c88cdf5

View File

@@ -22,7 +22,7 @@
#ifndef lint #ifndef lint
static char copyright[] = static char copyright[] =
"$Id: conflex.c,v 1.42 1999/04/05 15:33:11 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n"; "$Id: conflex.c,v 1.43 1999/04/08 17:46:15 mellon Exp $ Copyright (c) 1995, 1996, 1997, 1998, 1999 The Internet Software Consortium. All rights reserved.\n";
#endif /* not lint */ #endif /* not lint */
#include "dhcpd.h" #include "dhcpd.h"
@@ -43,7 +43,7 @@ static int lpos;
static int line; static int line;
static int tlpos; static int tlpos;
static int tline; static int tline;
static int token; static enum dhcp_token token;
static int ugflag; static int ugflag;
static char *tval; static char *tval;
static char tokbuf [1500]; static char tokbuf [1500];
@@ -55,12 +55,12 @@ int comment_index;
static int get_char PROTO ((FILE *)); static int get_char PROTO ((FILE *));
static int get_token PROTO ((FILE *)); static enum dhcp_token get_token PROTO ((FILE *));
static void skip_to_eol PROTO ((FILE *)); static void skip_to_eol PROTO ((FILE *));
static int read_string PROTO ((FILE *)); static enum dhcp_token read_string PROTO ((FILE *));
static int read_number PROTO ((int, FILE *)); static enum dhcp_token read_number PROTO ((int, FILE *));
static int read_num_or_name PROTO ((int, FILE *)); static enum dhcp_token read_num_or_name PROTO ((int, FILE *));
static int intern PROTO ((char *, int)); static enum dhcp_token intern PROTO ((char *, enum dhcp_token));
void new_parse (name) void new_parse (name)
char *name; char *name;
@@ -102,11 +102,11 @@ static int get_char (cfile)
return c; return c;
} }
static int get_token (cfile) static enum dhcp_token get_token (cfile)
FILE *cfile; FILE *cfile;
{ {
int c; int c;
int ttok; enum dhcp_token ttok;
static char tb [2]; static char tb [2];
int l, p, u; int l, p, u;
@@ -161,7 +161,7 @@ static int get_token (cfile)
return ttok; return ttok;
} }
int next_token (rval, cfile) enum dhcp_token next_token (rval, cfile)
char **rval; char **rval;
FILE *cfile; FILE *cfile;
{ {
@@ -186,7 +186,7 @@ int next_token (rval, cfile)
return rv; return rv;
} }
int peek_token (rval, cfile) enum dhcp_token peek_token (rval, cfile)
char **rval; char **rval;
FILE *cfile; FILE *cfile;
{ {
@@ -227,7 +227,7 @@ static void skip_to_eol (cfile)
} while (1); } while (1);
} }
static int read_string (cfile) static enum dhcp_token read_string (cfile)
FILE *cfile; FILE *cfile;
{ {
int i; int i;
@@ -261,7 +261,7 @@ static int read_string (cfile)
return STRING; return STRING;
} }
static int read_number (c, cfile) static enum dhcp_token read_number (c, cfile)
int c; int c;
FILE *cfile; FILE *cfile;
{ {
@@ -297,12 +297,12 @@ static int read_number (c, cfile)
return token; return token;
} }
static int read_num_or_name (c, cfile) static enum dhcp_token read_num_or_name (c, cfile)
int c; int c;
FILE *cfile; FILE *cfile;
{ {
int i = 0; int i = 0;
int rv = NUMBER_OR_NAME; enum dhcp_token rv = NUMBER_OR_NAME;
tokbuf [i++] = c; tokbuf [i++] = c;
for (; i < sizeof tokbuf; i++) { for (; i < sizeof tokbuf; i++) {
c = get_char (cfile); c = get_char (cfile);
@@ -325,9 +325,9 @@ static int read_num_or_name (c, cfile)
return intern (tval, rv); return intern (tval, rv);
} }
static int intern (atom, dfv) static enum dhcp_token intern (atom, dfv)
char *atom; char *atom;
int dfv; enum dhcp_token dfv;
{ {
if (!isascii (atom [0])) if (!isascii (atom [0]))
return dfv; return dfv;