mirror of
https://github.com/gryf/wmaker.git
synced 2026-03-23 20:43:31 +01:00
util: add explicit types for calback functions definitions
It makes the code easier to read to explicitly define a type for the functions that are used for callbacks, so this patch does this for the wmmenugen tool. It was an opportunity to highlight some variable definitions that looked like function prototypes, and were as such misplaced in the code, being a source of confusion. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
b75ac967d9
commit
765814e393
@@ -50,6 +50,9 @@ extern WMTreeNode *menu;
|
||||
|
||||
extern char *env_lang, *env_ctry, *env_enc, *env_mod;
|
||||
|
||||
/* Type for the call-back function to add a menu entry to the current menu */
|
||||
typedef void cb_add_menu_entry(WMMenuEntry *entry);
|
||||
|
||||
/* wmmenu_misc.c
|
||||
*/
|
||||
void parse_locale(const char *what, char **env_lang, char **env_ctry, char **env_enc, char **env_mod);
|
||||
@@ -58,8 +61,8 @@ Bool fileInPath(const char *file);
|
||||
|
||||
/* implemented parsers
|
||||
*/
|
||||
void parse_xdg(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
|
||||
void parse_wmconfig(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
|
||||
void parse_xdg(const char *file, cb_add_menu_entry *addWMMenuEntryCallback);
|
||||
void parse_wmconfig(const char *file, cb_add_menu_entry *addWMMenuEntryCallback);
|
||||
Bool wmconfig_validate_file(const char *filename, const struct stat *st, int tflags, struct FTW *ftw);
|
||||
|
||||
#endif /* WMMENUGEN_H */
|
||||
|
||||
Reference in New Issue
Block a user