rename NameFuncLink to name_func_list_t
This commit is contained in:
parent
b8ff99f652
commit
e6c0449009
7
config.c
7
config.c
|
@ -61,10 +61,9 @@ typedef struct
|
||||||
unsigned int button;
|
unsigned int button;
|
||||||
} MouseButton;
|
} MouseButton;
|
||||||
|
|
||||||
extern const NameFuncLink UicbList[];
|
extern const name_func_link_t UicbList[];
|
||||||
extern const NameFuncLink WidgetList[];
|
extern const name_func_link_t WidgetList[];
|
||||||
extern const NameFuncLink LayoutsList[];
|
extern const name_func_link_t LayoutsList[];
|
||||||
|
|
||||||
|
|
||||||
static unsigned int
|
static unsigned int
|
||||||
get_numlockmask(Display *disp)
|
get_numlockmask(Display *disp)
|
||||||
|
|
2
layout.c
2
layout.c
|
@ -38,7 +38,7 @@
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
const NameFuncLink LayoutsList[] =
|
const name_func_link_t LayoutsList[] =
|
||||||
{
|
{
|
||||||
{"tile", layout_tile},
|
{"tile", layout_tile},
|
||||||
{"tileleft", layout_tileleft},
|
{"tileleft", layout_tileleft},
|
||||||
|
|
2
uicb.c
2
uicb.c
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
extern AwesomeConf globalconf;
|
extern AwesomeConf globalconf;
|
||||||
|
|
||||||
const NameFuncLink UicbList[] =
|
const name_func_link_t UicbList[] =
|
||||||
{
|
{
|
||||||
/* xutil.c */
|
/* xutil.c */
|
||||||
{"spawn", uicb_spawn},
|
{"spawn", uicb_spawn},
|
||||||
|
|
4
util.c
4
util.c
|
@ -68,13 +68,13 @@ compute_new_value_from_arg(const char *arg, double current_value)
|
||||||
|
|
||||||
|
|
||||||
/** Lookup for a function pointer from its name
|
/** Lookup for a function pointer from its name
|
||||||
* in the given NameFuncLink list
|
* in the given name_func_link_t list
|
||||||
* \param funcname Function name
|
* \param funcname Function name
|
||||||
* \param list Function and name link list
|
* \param list Function and name link list
|
||||||
* \return function pointer
|
* \return function pointer
|
||||||
*/
|
*/
|
||||||
void *
|
void *
|
||||||
name_func_lookup(const char *funcname, const NameFuncLink * list)
|
name_func_lookup(const char *funcname, const name_func_link_t *list)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
|
4
util.h
4
util.h
|
@ -31,7 +31,7 @@ typedef struct
|
||||||
{
|
{
|
||||||
const char *name;
|
const char *name;
|
||||||
void *func;
|
void *func;
|
||||||
} NameFuncLink;
|
} name_func_link_t;
|
||||||
|
|
||||||
/** \brief replace \c NULL strings with emtpy strings */
|
/** \brief replace \c NULL strings with emtpy strings */
|
||||||
#define NONULL(x) (x ? x : "")
|
#define NONULL(x) (x ? x : "")
|
||||||
|
@ -220,7 +220,7 @@ void die(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(pr
|
||||||
void eprint(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2)));
|
void eprint(const char *, ...) __attribute__ ((noreturn)) __attribute__ ((format(printf, 1, 2)));
|
||||||
double compute_new_value_from_arg(const char *, double);
|
double compute_new_value_from_arg(const char *, double);
|
||||||
void warn(const char *, ...) __attribute__ ((format(printf, 1, 2)));
|
void warn(const char *, ...) __attribute__ ((format(printf, 1, 2)));
|
||||||
void *name_func_lookup(const char *, const NameFuncLink *);
|
void *name_func_lookup(const char *, const name_func_link_t *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80
|
||||||
|
|
Loading…
Reference in New Issue