mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-07 01:55:48 +01:00
Remove dependency to CPP: support for #include directive
The parser is prepared to handle '#' directives, starting with file inclusion. The search path for the file are taken from what was actually given to CPP. There is an arbitrary limit to the inclusion nesting, which is actually not a design limitation but a security to avoid infinite include loops.
This commit is contained in:
committed by
Carlos R. Mafra
parent
ed9482b626
commit
88a82ab8df
@@ -28,8 +28,12 @@
|
||||
*/
|
||||
|
||||
#define MAXLINE 1024
|
||||
#define MAX_NESTED_INCLUDES 16 // To avoid infinite includes case
|
||||
|
||||
struct w_menu_parser {
|
||||
WMenuParser include_file;
|
||||
WMenuParser parent_file;
|
||||
const char *include_default_paths;
|
||||
const char *file_name;
|
||||
FILE *file_handle;
|
||||
int line_number;
|
||||
|
||||
Reference in New Issue
Block a user