diff options
Diffstat (limited to 'protocols/msn')
-rw-r--r-- | protocols/msn/msn.c | 8 | ||||
-rw-r--r-- | protocols/msn/msn.h | 14 | ||||
-rw-r--r-- | protocols/msn/ns.c | 6 | ||||
-rw-r--r-- | protocols/msn/sb.c | 2 | ||||
-rw-r--r-- | protocols/msn/tables.c | 12 |
5 files changed, 21 insertions, 21 deletions
diff --git a/protocols/msn/msn.c b/protocols/msn/msn.c index b828d31c..b03c898e 100644 --- a/protocols/msn/msn.c +++ b/protocols/msn/msn.c @@ -169,17 +169,17 @@ static GList *msn_away_states( struct gaim_connection *gc ) int i; for( i = 0; msn_away_state_list[i].number > -1; i ++ ) - l = g_list_append( l, msn_away_state_list[i].name ); + l = g_list_append( l, (void*) msn_away_state_list[i].name ); return( l ); } static char *msn_get_status_string( struct gaim_connection *gc, int number ) { - struct msn_away_state *st = msn_away_state_by_number( number ); + const struct msn_away_state *st = msn_away_state_by_number( number ); if( st ) - return( st->name ); + return( (char*) st->name ); else return( "" ); } @@ -188,7 +188,7 @@ static void msn_set_away( struct gaim_connection *gc, char *state, char *message { char buf[1024]; struct msn_data *md = gc->proto_data; - struct msn_away_state *st; + const struct msn_away_state *st; if( strcmp( state, GAIM_AWAY_CUSTOM ) == 0 ) st = msn_away_state_by_name( "Away" ); diff --git a/protocols/msn/msn.h b/protocols/msn/msn.h index c8c7a788..9727c537 100644 --- a/protocols/msn/msn.h +++ b/protocols/msn/msn.h @@ -66,7 +66,7 @@ struct msn_data GSList *msgq; GSList *switchboards; int buddycount; - struct msn_away_state *away_state; + const struct msn_away_state *away_state; }; struct msn_switchboard @@ -130,8 +130,8 @@ struct msn_handler_data #define STATUS_SB_CHAT_SPARE 8 /* Same, but also for groupchats (not used yet). */ int msn_chat_id; -extern struct msn_away_state msn_away_state_list[]; -extern struct msn_status_code msn_status_code_list[]; +extern const struct msn_away_state msn_away_state_list[]; +extern const struct msn_status_code msn_status_code_list[]; /* Keep a list of all the active connections. We need these lists because "connected" callbacks might be called when the connection they belong too @@ -155,10 +155,10 @@ char **msn_linesplit( char *line ); int msn_handler( struct msn_handler_data *h ); /* tables.c */ -struct msn_away_state *msn_away_state_by_number( int number ); -struct msn_away_state *msn_away_state_by_code( char *code ); -struct msn_away_state *msn_away_state_by_name( char *name ); -struct msn_status_code *msn_status_by_number( int number ); +const struct msn_away_state *msn_away_state_by_number( int number ); +const struct msn_away_state *msn_away_state_by_code( char *code ); +const struct msn_away_state *msn_away_state_by_name( char *name ); +const struct msn_status_code *msn_status_by_number( int number ); /* sb.c */ int msn_sb_write( struct msn_switchboard *sb, char *s, int len ); diff --git a/protocols/msn/ns.c b/protocols/msn/ns.c index 2d90b2f3..4ced58a0 100644 --- a/protocols/msn/ns.c +++ b/protocols/msn/ns.c @@ -364,7 +364,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) } else if( strcmp( cmd[0], "ILN" ) == 0 ) { - struct msn_away_state *st; + const struct msn_away_state *st; if( num_parts != 6 ) { @@ -392,7 +392,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) } else if( strcmp( cmd[0], "NLN" ) == 0 ) { - struct msn_away_state *st; + const struct msn_away_state *st; if( num_parts != 5 ) { @@ -538,7 +538,7 @@ static int msn_ns_command( gpointer data, char **cmd, int num_parts ) else if( isdigit( cmd[0][0] ) ) { int num = atoi( cmd[0] ); - struct msn_status_code *err = msn_status_by_number( num ); + const struct msn_status_code *err = msn_status_by_number( num ); g_snprintf( buf, sizeof( buf ), "Error reported by MSN server: %s", err->text ); do_error_dialog( gc, buf, "MSN" ); diff --git a/protocols/msn/sb.c b/protocols/msn/sb.c index 11728f03..9e7ef841 100644 --- a/protocols/msn/sb.c +++ b/protocols/msn/sb.c @@ -511,7 +511,7 @@ static int msn_sb_command( gpointer data, char **cmd, int num_parts ) else if( isdigit( cmd[0][0] ) ) { int num = atoi( cmd[0] ); - struct msn_status_code *err = msn_status_by_number( num ); + const struct msn_status_code *err = msn_status_by_number( num ); g_snprintf( buf, sizeof( buf ), "Error reported by switchboard server: %s", err->text ); do_error_dialog( gc, buf, "MSN" ); diff --git a/protocols/msn/tables.c b/protocols/msn/tables.c index 2741048a..f8e98350 100644 --- a/protocols/msn/tables.c +++ b/protocols/msn/tables.c @@ -26,7 +26,7 @@ #include "nogaim.h" #include "msn.h" -struct msn_away_state msn_away_state_list[] = +const struct msn_away_state msn_away_state_list[] = { { 0, "NLN", "Available" }, { 1, "BSY", "Busy" }, @@ -39,7 +39,7 @@ struct msn_away_state msn_away_state_list[] = { -1, "", "" } }; -struct msn_away_state *msn_away_state_by_number( int number ) +const struct msn_away_state *msn_away_state_by_number( int number ) { int i; @@ -50,7 +50,7 @@ struct msn_away_state *msn_away_state_by_number( int number ) return( NULL ); } -struct msn_away_state *msn_away_state_by_code( char *code ) +const struct msn_away_state *msn_away_state_by_code( char *code ) { int i; @@ -61,7 +61,7 @@ struct msn_away_state *msn_away_state_by_code( char *code ) return( NULL ); } -struct msn_away_state *msn_away_state_by_name( char *name ) +const struct msn_away_state *msn_away_state_by_name( char *name ) { int i; @@ -72,7 +72,7 @@ struct msn_away_state *msn_away_state_by_name( char *name ) return( NULL ); } -struct msn_status_code msn_status_code_list[] = +const struct msn_status_code msn_status_code_list[] = { { 200, "Invalid syntax", 0 }, { 201, "Invalid parameter", 0 }, @@ -143,7 +143,7 @@ struct msn_status_code msn_status_code_list[] = { -1, NULL, 0 } }; -struct msn_status_code *msn_status_by_number( int number ) +const struct msn_status_code *msn_status_by_number( int number ) { static struct msn_status_code *unknown = NULL; int i; |