38static int get_char(
struct parse *);
39static void unget_char(
struct parse *,
int);
40static void skip_to_eol(
struct parse *);
60 tmp->cur_line =
tmp->line1;
61 tmp->prev_line =
tmp->line2;
62 tmp->token_line =
tmp->cur_line;
63 tmp->cur_line[0] =
tmp->prev_line[0] = 0;
100 if (
cfile->file != -1) {
113 cfile->stack_size = 0;
187 if (!
cfile->ugflag) {
198 cfile->cur_line[0] = 0;
199 }
else if (
c !=
EOF) {
200 if (
cfile->lpos <= 80) {
257 if (!((
c ==
'\n') &&
cfile->eol_token) &&
282 }
else if (
c ==
EOF) {
309get_next_token(
const char **
rval,
unsigned *
rlen,
447 memset(buf, 0,
sizeof(buf));
458 if (++
cc <
sizeof(buf) - 1)
474 if (
ofs >= (
sizeof(
cfile->tokbuf) - 1)) {
481 "whitespace too long, buffer overflow.");
487 }
while (!((
c ==
'\n') &&
cfile->eol_token) &&
513 for (
i = 0;
i <
sizeof(
cfile->tokbuf);
i++) {
552 if (
c >=
'0' &&
c <=
'9') {
554 }
else if (
c >=
'a' &&
c <=
'f') {
556 }
else if (
c >=
'A' &&
c <=
'F') {
560 "invalid hex digit: %x",
568 if (
c >=
'0' &&
c <=
'7') {
573 "invalid octal digit %x",
585 }
else if (
c ==
'\\') {
595 if (
i ==
sizeof(
cfile->tokbuf))
597 "string constant larger than internal buffer");
611 for (;
i <
sizeof(
cfile->tokbuf);
i++) {
632 (
cfile->tokbuf[0] ==
'0') &&
633 ((
cfile->tokbuf[1] ==
'x') ||
634 (
cfile->tokbuf[1] ==
'X'))) {
637 }
else if (((
c ==
'-') || (
c ==
'_') ||
isalnum(
c))) {
652 "read_number(): impossible case");
658 if (
i ==
sizeof(
cfile->tokbuf))
660 "numeric token larger than internal buffer");
671 if ((
i == 1) && (
cfile->tokbuf[
i] ==
'-'))
684 for (;
i <
sizeof(
cfile->tokbuf);
i++) {
695 if (
i ==
sizeof(
cfile->tokbuf))
700 return intern(
cfile->tval,
rv);
830 if (
atom[6] ==
'-') {
858 "munications-interrupted"))
1284 if (
atom[7] ==
'\0')
1317 "olution-interrupted"))
1355 if (
atom[6] ==
'\0')
1365 if (
atom[6] ==
'\0')
1367 if (
atom[6] ==
'-') {
1499 "-lease-addr-for-default-route"))
enum dhcp_token next_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token peek_raw_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token peek_token(const char **rval, unsigned *rlen, struct parse *cfile)
enum dhcp_token next_token(const char **rval, unsigned *rlen, struct parse *cfile)
isc_result_t end_parse(struct parse **cfile)
isc_result_t new_parse(struct parse **cfile, int file, char *inbuf, unsigned buflen, const char *name, int eolp)
enum dhcp_token do_peek_token(const char **rval, unsigned int *rlen, struct parse *cfile, isc_boolean_t raw)
isc_result_t save_parse_state(struct parse *cfile)
isc_result_t restore_parse_state(struct parse *cfile)
struct comment * createComment(const char *line)
#define TAILQ_INSERT_AFTER(head, listelm, elm)
#define TAILQ_INSERT_TAIL(head, elm)
#define TAILQ_REMOVE(head, elm)
@ USE_LEASE_ADDR_FOR_DEFAULT_ROUTE
@ DYNAMIC_BOOTP_LEASE_CUTOFF
@ DYNAMIC_BOOTP_LEASE_LENGTH
@ COMMUNICATIONS_INTERRUPTED
void parse_error(struct parse *cfile, const char *fmt,...)
struct parse * saved_state