1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-08 23:04:15 +01:00

Remove dependency to CPP: create structure to keep info of file being parsed

All the information related to the file being parsed are stored in
a single place. The content of this structure is not visible to
caller to avoid messing the content; the parsing will be handled as
methods to this object.

Please note that all functions visible as part of the parser's API
are using the CamelCaseNotation to be consistent with the rest of
the API; however all internal functions use the non_camel_case_syntax
to follow the coding style set by Carlos for the project.
This commit is contained in:
Christophe CURIS
2012-07-08 14:20:24 +02:00
committed by Carlos R. Mafra
parent f0e8b76c03
commit 19f0998cd1
5 changed files with 108 additions and 18 deletions

View File

@@ -869,9 +869,18 @@ extern char *WMUserDefaultsDidChangeNotification;
/* ---[ WINGs/menuparser.c ]---------------------------------------------- */
char *getLine(void * file, const char *file_name);
typedef struct w_menu_parser *WMenuParser;
WMenuParser WMenuParserCreate(const char *file_name, void *file);
const char *WMenuParserGetFilename(WMenuParser parser);
char *getLine(WMenuParser parser);
void separateline(char *line, char **title, char **command, char **parameter, char **shortcut);
void WMenuParserDelete(WMenuParser parser);
/*-------------------------------------------------------------------------*/