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 /env_universal_common.c | |
parent | 3a60fc52061961ad98614c19e3e12a0e251e3777 (diff) |
Key binding functions
darcs-hash:20050920234200-ac50b-3895a97cb024368258cd1562bdcc9fda2c84f521.gz
Diffstat (limited to 'env_universal_common.c')
-rw-r--r-- | env_universal_common.c | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/env_universal_common.c b/env_universal_common.c index 3f28ade3..de81f197 100644 --- a/env_universal_common.c +++ b/env_universal_common.c @@ -48,18 +48,21 @@ */ #define PARSE_ERR L"Unable to parse universal variable message: '%ls'" -static void parse_message( wchar_t *msg, connection_t *src ); +static void parse_message( wchar_t *msg, + connection_t *src ); /** The table of all universal variables */ hash_table_t env_universal_var; -void (*callback)(int type, const wchar_t *key, const wchar_t *val ); +void (*callback)( int type, + const wchar_t *key, + const wchar_t *val ); -void env_universal_common_init(void (*cb)(int type, const wchar_t *key, const wchar_t *val ) ) +void env_universal_common_init( void (*cb)(int type, const wchar_t *key, const wchar_t *val ) ) { debug( 2, L"Init env_universal_common" ); callback = cb; @@ -107,8 +110,8 @@ void read_message( connection_t *src ) if( src->input.used > 0 ) { debug( 1, - L"Universal variable connection closed while reading command. Partial command recieved: '%ls'", - (wchar_t *)src->input.buff ); + L"Universal variable connection closed while reading command. Partial command recieved: '%ls'", + (wchar_t *)src->input.buff ); } return; } @@ -159,7 +162,8 @@ static int match( const wchar_t *msg, const wchar_t *cmd ) } -static void parse_message( wchar_t *msg, connection_t *src ) +static void parse_message( wchar_t *msg, + connection_t *src ) { debug( 2, L"parse_message( %ls );", msg ); @@ -245,7 +249,8 @@ static void parse_message( wchar_t *msg, connection_t *src ) } } -int try_send( message_t *msg, int fd ) +int try_send( message_t *msg, + int fd ) { int res = write( fd, msg->body, strlen(msg->body) ); |