mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 20:38:08 +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
@@ -969,7 +969,7 @@ static WMenu *readMenuFile(WScreen * scr, char *file_name)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
parser = WMenuParserCreate(file_name, file);
|
||||
parser = WMenuParserCreate(file_name, file, DEF_CONFIG_PATHS);
|
||||
|
||||
while (WMenuParserGetLine(parser, &title, &command, ¶ms, &shortcut)) {
|
||||
|
||||
@@ -1060,7 +1060,7 @@ static WMenu *readMenuPipe(WScreen * scr, char **file_name)
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
parser = WMenuParserCreate(flat_file, file);
|
||||
parser = WMenuParserCreate(flat_file, file, DEF_CONFIG_PATHS);
|
||||
|
||||
while (WMenuParserGetLine(parser, &title, &command, ¶ms, &shortcut)) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user