Changeset fb020ac for protocols/msn/tables.c
- Timestamp:
- 2010-03-07T18:43:23Z (15 years ago)
- Branches:
- master
- Children:
- 279607e
- Parents:
- e08e53c (diff), c32f492 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
protocols/msn/tables.c
re08e53c rfb020ac 29 29 const struct msn_away_state msn_away_state_list[] = 30 30 { 31 { 0, "NLN", "Available" },32 { 1, "BSY", "Busy" },33 { 3, "IDL", "Idle" },34 { 5, "BRB", "Be Right Back" },35 { 7, "AWY", "Away" },36 { 9,"PHN", "On the Phone" },37 { 11,"LUN", "Out to Lunch" },38 { 13,"HDN", "Hidden" },39 { -1,"", "" }31 { "NLN", "" }, 32 { "AWY", "Away" }, 33 { "BSY", "Busy" }, 34 { "IDL", "Idle" }, 35 { "BRB", "Be Right Back" }, 36 { "PHN", "On the Phone" }, 37 { "LUN", "Out to Lunch" }, 38 { "HDN", "Hidden" }, 39 { "", "" } 40 40 }; 41 42 const struct msn_away_state *msn_away_state_by_number( int number )43 {44 int i;45 46 for( i = 0; msn_away_state_list[i].number > -1; i ++ )47 if( msn_away_state_list[i].number == number )48 return( msn_away_state_list + i );49 50 return( NULL );51 }52 41 53 42 const struct msn_away_state *msn_away_state_by_code( char *code ) … … 55 44 int i; 56 45 57 for( i = 0; msn_away_state_list[i].number > -1; i ++ )46 for( i = 0; *msn_away_state_list[i].code; i ++ ) 58 47 if( g_strcasecmp( msn_away_state_list[i].code, code ) == 0 ) 59 48 return( msn_away_state_list + i ); 60 49 61 return ( NULL );50 return NULL; 62 51 } 63 52 … … 66 55 int i; 67 56 68 for( i = 0; msn_away_state_list[i].number > -1; i ++ )57 for( i = 0; *msn_away_state_list[i].code; i ++ ) 69 58 if( g_strcasecmp( msn_away_state_list[i].name, name ) == 0 ) 70 59 return( msn_away_state_list + i ); 71 60 72 return ( NULL );61 return NULL; 73 62 } 74 63
Note: See TracChangeset
for help on using the changeset viewer.