diff options
author | axel <axel@liljencrantz.se> | 2005-09-21 09:42:00 +1000 |
---|---|---|
committer | axel <axel@liljencrantz.se> | 2005-09-21 09:42:00 +1000 |
commit | e3ce01d6855c9330b1cd2dec19eff1139676c7db (patch) | |
tree | d982476194567eb2544a84fc12bfba1033995ccc /function.c | |
parent | 3a60fc52061961ad98614c19e3e12a0e251e3777 (diff) |
Key binding functions
darcs-hash:20050920234200-ac50b-3895a97cb024368258cd1562bdcc9fda2c84f521.gz
Diffstat (limited to 'function.c')
-rw-r--r-- | function.c | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -8,7 +8,6 @@ #include <termios.h> #include <signal.h> - #include "config.h" #include "util.h" #include "function.h" @@ -31,6 +30,7 @@ typedef struct wchar_t *cmd; /** Function description */ wchar_t *desc; + int is_binding; } function_data_t; @@ -61,7 +61,8 @@ void function_destroy() void function_add( const wchar_t *name, const wchar_t *val, - const wchar_t *desc ) + const wchar_t *desc, + int is_binding) { if( function_exists( name ) ) function_remove( name ); @@ -69,6 +70,7 @@ void function_add( const wchar_t *name, function_data_t *d = malloc( sizeof( function_data_t ) ); d->cmd = wcsdup( val ); d->desc = desc?wcsdup( desc ):0; + d->is_binding = is_binding; hash_put( &function, intern(name), d ); } @@ -130,7 +132,9 @@ static void get_names_internal( const void *key, void *aux ) { wchar_t *name = (wchar_t *)key; - if( name[0] != L'_' ) + function_data_t *f = (function_data_t *)val; + + if( name[0] != L'_' && !f->is_binding) al_push( (array_list_t *)aux, name ); } |