From 4be266a9831799dcc2e67e83fc83d9db43828a64 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 18 Jul 2012 19:29:33 +0200 Subject: Implements wildcard matching in config file include. Also fixes some minor bugs in include. Thanks Kelly Cochran for suggestion and draft patch. --- conf/conf.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'conf/conf.h') diff --git a/conf/conf.h b/conf/conf.h index b4ec3157..c76832b6 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -12,7 +12,6 @@ #include "lib/resource.h" #include "lib/timer.h" -#define BIRD_FNAME_MAX 255 /* Would be better to use some UNIX define */ /* Configuration structure */ @@ -91,7 +90,6 @@ void cfg_copy_list(list *dest, list *src, unsigned node_size); /* Lexer */ extern int (*cf_read_hook)(byte *buf, unsigned int max, int fd); -extern int (*cf_open_hook)(char *filename); struct symbol { struct symbol *next; @@ -117,12 +115,14 @@ struct symbol { #define SYM_VARIABLE 0x100 /* 0x100-0x1ff are variable types */ struct include_file_stack { - void *stack; /* Internal lexer state */ - unsigned int conf_lino; /* Current file lineno (at include) */ - char conf_fname[BIRD_FNAME_MAX]; /* Current file name */ - int conf_fd; /* Current file descriptor */ - struct include_file_stack *prev; - struct include_file_stack *next; + void *buffer; /* Internal lexer state */ + char *file_name; /* File name */ + int fd; /* File descriptor */ + int lino; /* Current line num */ + int depth; /* Include depth, 0 = cannot include */ + + struct include_file_stack *prev; /* Previous record in stack */ + struct include_file_stack *up; /* Parent (who included this file) */ }; extern struct include_file_stack *ifs; -- cgit v1.2.3