diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-07-18 19:29:33 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-07-18 19:29:33 +0200 |
commit | 4be266a9831799dcc2e67e83fc83d9db43828a64 (patch) | |
tree | 13e880c5b078b851ba51688ed416c6dab3754545 /conf/conf.h | |
parent | abced4a91495e27fe86b142bc1967cec53bab3dc (diff) |
Implements wildcard matching in config file include.
Also fixes some minor bugs in include.
Thanks Kelly Cochran for suggestion and draft patch.
Diffstat (limited to 'conf/conf.h')
-rw-r--r-- | conf/conf.h | 16 |
1 files changed, 8 insertions, 8 deletions
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; |