1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-03-22 19: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:
Christophe CURIS
2014-07-04 23:28:48 +02:00
committed by Carlos R. Mafra
parent b75ac967d9
commit 765814e393
4 changed files with 16 additions and 6 deletions

View File

@@ -37,11 +37,16 @@ static int dirParseFunc(const char *filename, const struct stat *st, int tflags,
static int menuSortFunc(const void *left, const void *right);
static int nodeFindSubMenuByNameFunc(const void *item, const void *cdata);
static WMTreeNode *findPositionInMenu(const char *submenu);
static void (*parse)(const char *file, void (*addWMMenuEntryCallback)(WMMenuEntry *aEntry));
static Bool (*validateFilename)(const char *filename, const struct stat *st, int tflags, struct FTW *ftw);
typedef void fct_parse_menufile(const char *file, cb_add_menu_entry *addWMMenuEntryCallback);
typedef Bool fct_validate_filename(const char *filename, const struct stat *st, int tflags, struct FTW *ftw);
static WMArray *plMenuNodes;
static const char *terminal;
static fct_parse_menufile *parse;
static fct_validate_filename *validateFilename;
extern char *__progname;