diff options
| author | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-12 19:10:16 +0000 | 
|---|---|---|
| committer | Wilmer van der Gaast <wilmer@gaast.net> | 2010-03-12 19:10:16 +0000 | 
| commit | be609ff2b0ca885612c0e6d81f82c4f26ed4f58d (patch) | |
| tree | b9f83fdc44bd00921ffb9c23035b1f39d565ba93 /protocols/msn/tables.c | |
| parent | 08e5bb2bb2fcc7125f837be4f225d3a9ebf320ed (diff) | |
| parent | 8b6b7405d3844271f7bff56e527bfeb1a4872975 (diff) | |
Merging mainline.
Diffstat (limited to 'protocols/msn/tables.c')
| -rw-r--r-- | protocols/msn/tables.c | 37 | 
1 files changed, 13 insertions, 24 deletions
| diff --git a/protocols/msn/tables.c b/protocols/msn/tables.c index 5ba9ea73..42b12aa9 100644 --- a/protocols/msn/tables.c +++ b/protocols/msn/tables.c @@ -28,48 +28,37 @@  const struct msn_away_state msn_away_state_list[] =  { -	{  0, "NLN", "Available" }, -	{  1, "BSY", "Busy" }, -	{  3, "IDL", "Idle" }, -	{  5, "BRB", "Be Right Back" }, -	{  7, "AWY", "Away" }, -	{  9, "PHN", "On the Phone" }, -	{ 11, "LUN", "Out to Lunch" }, -	{ 13, "HDN", "Hidden" }, -	{ -1, "",    "" } +	{ "NLN", "" }, +	{ "AWY", "Away" }, +	{ "BSY", "Busy" }, +	{ "IDL", "Idle" }, +	{ "BRB", "Be Right Back" }, +	{ "PHN", "On the Phone" }, +	{ "LUN", "Out to Lunch" }, +	{ "HDN", "Hidden" }, +	{ "",    "" }  }; -const struct msn_away_state *msn_away_state_by_number( int number ) -{ -	int i; -	 -	for( i = 0; msn_away_state_list[i].number > -1; i ++ ) -		if( msn_away_state_list[i].number == number ) -			return( msn_away_state_list + i ); -	 -	return( NULL ); -} -  const struct msn_away_state *msn_away_state_by_code( char *code )  {  	int i; -	for( i = 0; msn_away_state_list[i].number > -1; i ++ ) +	for( i = 0; *msn_away_state_list[i].code; i ++ )  		if( g_strcasecmp( msn_away_state_list[i].code, code ) == 0 )  			return( msn_away_state_list + i ); -	return( NULL ); +	return NULL;  }  const struct msn_away_state *msn_away_state_by_name( char *name )  {  	int i; -	for( i = 0; msn_away_state_list[i].number > -1; i ++ ) +	for( i = 0; *msn_away_state_list[i].code; i ++ )  		if( g_strcasecmp( msn_away_state_list[i].name, name ) == 0 )  			return( msn_away_state_list + i ); -	return( NULL ); +	return NULL;  }  const struct msn_status_code msn_status_code_list[] = | 
