From: Piotr S. <ps...@us...> - 2009-09-17 12:05:39
|
Update of /cvsroot/ayttm/ayttm/modules/irc In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv12682/modules/irc Modified Files: irc.c irc.h Log Message: reformatted source code Index: irc.c =================================================================== RCS file: /cvsroot/ayttm/ayttm/modules/irc/irc.c,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- irc.c 7 Sep 2009 08:21:20 -0000 1.62 +++ irc.c 17 Sep 2009 12:04:58 -0000 1.63 @@ -58,20 +58,18 @@ #include "pixmaps/irc_online.xpm" #include "pixmaps/irc_away.xpm" - /******************************************************************************* * Begin Module Code ******************************************************************************/ /* Module defines */ #ifndef USE_POSIX_DLOPEN - #define plugin_info irc_LTX_plugin_info - #define SERVICE_INFO irc_LTX_SERVICE_INFO [...2048 lines suppressed...] /* Errors */ - cb->irc_no_such_nick = ay_irc_no_such_nick; - cb->irc_no_such_server = ay_irc_no_such_server; - cb->irc_no_such_channel = ay_irc_no_such_channel; - cb->irc_nick_in_use = ay_irc_nick_in_use; - cb->irc_password_mismatch = ay_irc_password_mismatch; + cb->irc_no_such_nick = ay_irc_no_such_nick; + cb->irc_no_such_server = ay_irc_no_such_server; + cb->irc_no_such_channel = ay_irc_no_such_channel; + cb->irc_nick_in_use = ay_irc_nick_in_use; + cb->irc_password_mismatch = ay_irc_password_mismatch; /* cb->irc_cant_sendto_chnl = ay_irc_cant_sendto_chnl; cb->irc_was_no_such_nick = ay_irc_was_no_such_nick; cb->irc_too_many_chnl = ay_irc_too_many_chnl; @@ -2310,4 +2439,3 @@ return cb; } - Index: irc.h =================================================================== RCS file: /cvsroot/ayttm/ayttm/modules/irc/irc.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- irc.h 6 Sep 2009 18:23:08 -0000 1.5 +++ irc.h 17 Sep 2009 12:04:59 -0000 1.6 @@ -39,38 +39,35 @@ #define DBG_IRC do_irc_debug -typedef struct irc_local_account_type -{ - char password[MAX_PREF_LEN]; - int fd_tag; - int keepalive_tag; - int connect_tag; - int activity_tag; - char * buff; - int buff_user; - LList * friends; - LList * channel_list; - LList * current_rooms; +typedef struct irc_local_account_type { + char password[MAX_PREF_LEN]; + int fd_tag; + int keepalive_tag; + int connect_tag; + int activity_tag; + char *buff; + int buff_user; + LList *friends; + LList *channel_list; + LList *current_rooms; irc_account *ia; void (*got_public_chatrooms) (LList *list, void *data); void *public_chatroom_callback_data; - AyConnection * connection; + AyConnection *connection; } irc_local_account; -typedef struct irc_account_type -{ - char server[255]; - char realserver[255]; - int status; - int idle; - gboolean dummy; +typedef struct irc_account_type { + char server[255]; + char realserver[255]; + int status; + int idle; + gboolean dummy; } ay_irc_account; -typedef struct _irc_info -{ - char *whois_info; - eb_account *me; - char *fullmessage; +typedef struct _irc_info { + char *whois_info; + eb_account *me; + char *fullmessage; } irc_info; static int is_setting_state = 0; @@ -83,57 +80,61 @@ #define MAX_IRC_ACTION_LEN 255 /* IRC_COMMAND_TYPE: type of command in an irc_command_action struct. */ -enum IRC_COMMAND_TYPE -{ - IRC_COMMAND_BUILTIN = 1, - IRC_COMMAND_USER_DEF = 2 +enum IRC_COMMAND_TYPE { + IRC_COMMAND_BUILTIN = 1, + IRC_COMMAND_USER_DEF = 2 }; -typedef struct irc_command_action_type -{ - char command[MAX_IRC_COMMAND_LEN]; - char action[MAX_IRC_ACTION_LEN]; - enum IRC_COMMAND_TYPE command_type; +typedef struct irc_command_action_type { + char command[MAX_IRC_COMMAND_LEN]; + char action[MAX_IRC_ACTION_LEN]; + enum IRC_COMMAND_TYPE command_type; } irc_command_action; - /* Local prototypes */ -static unsigned char *strip_color (unsigned char *text); -static int ay_irc_query_connected (eb_account * account); -static void ay_irc_login( eb_local_account * account); -static void ay_irc_logout( eb_local_account * ela ); -static void ay_irc_send_im( eb_local_account * account_from, eb_account * account_to,char *message ); -static eb_local_account * ay_irc_read_local_config(LList * pairs); -static LList * ay_irc_write_local_config( eb_local_account * account ); -static eb_account * ay_irc_read_config(eb_account *ea, LList *config ); -static LList * ay_irc_get_states(); -static int ay_irc_get_current_state(eb_local_account * account ); -static void ay_irc_set_current_state(eb_local_account * account, int state ); -static char * ay_irc_check_login(const char * user, const char * pass); -static void ay_irc_add_user( eb_account * account ); -static void ay_irc_del_user( eb_account * account ); -static int ay_irc_is_suitable (eb_local_account *local, eb_account *remote); -static eb_account * ay_irc_new_account(eb_local_account *ela, const char * account ); -static const char * ay_irc_get_status_string( eb_account * account ); -static void *ay_irc_get_status_pixbuf( eb_account * account); -static void ay_irc_set_idle(eb_local_account * account, int idle ); -static void ay_irc_set_away( eb_local_account * account, char * message, int away); -static void ay_irc_send_file( eb_local_account * from, eb_account * to, char * file ); -static void irc_info_update(info_window * iw); -static void irc_info_data_cleanup(info_window * iw); -static void ay_irc_get_info( eb_local_account * account_from, eb_account * account_to); +static unsigned char *strip_color(unsigned char *text); +static int ay_irc_query_connected(eb_account *account); +static void ay_irc_login(eb_local_account *account); +static void ay_irc_logout(eb_local_account *ela); +static void ay_irc_send_im(eb_local_account *account_from, + eb_account *account_to, char *message); +static eb_local_account *ay_irc_read_local_config(LList *pairs); +static LList *ay_irc_write_local_config(eb_local_account *account); +static eb_account *ay_irc_read_config(eb_account *ea, LList *config); +static LList *ay_irc_get_states(); +static int ay_irc_get_current_state(eb_local_account *account); +static void ay_irc_set_current_state(eb_local_account *account, int state); +static char *ay_irc_check_login(const char *user, const char *pass); +static void ay_irc_add_user(eb_account *account); +static void ay_irc_del_user(eb_account *account); +static int ay_irc_is_suitable(eb_local_account *local, eb_account *remote); +static eb_account *ay_irc_new_account(eb_local_account *ela, + const char *account); +static const char *ay_irc_get_status_string(eb_account *account); +static void *ay_irc_get_status_pixbuf(eb_account *account); +static void ay_irc_set_idle(eb_local_account *account, int idle); +static void ay_irc_set_away(eb_local_account *account, char *message, int away); +static void ay_irc_send_file(eb_local_account *from, eb_account *to, + char *file); +static void irc_info_update(info_window *iw); +static void irc_info_data_cleanup(info_window *iw); +static void ay_irc_get_info(eb_local_account *account_from, + eb_account *account_to); static void ay_irc_join_chat_room(eb_chat_room *room); static void ay_irc_leave_chat_room(eb_chat_room *room); static void ay_irc_send_chat_room_message(eb_chat_room *room, char *message); -static void ay_irc_send_invite( eb_local_account * account, eb_chat_room * room, char * user, const char * message); -static eb_chat_room * ay_irc_make_chat_room(char * name, eb_local_account * account, int is_public); -static eb_chat_room *ay_irc_make_chat_room_window(char *name, eb_local_account *account, int is_public, int send_join); -static void ay_irc_accept_invite( eb_local_account * account, void * invitation ); -static void ay_irc_decline_invite( eb_local_account * account, void * invitation ); -static void eb_irc_read_prefs_config(LList * values); -static LList * eb_irc_write_prefs_config(); -static void irc_connect_cb(AyConnection *con, AyConnectionStatus error, void *data); +static void ay_irc_send_invite(eb_local_account *account, eb_chat_room *room, + char *user, const char *message); +static eb_chat_room *ay_irc_make_chat_room(char *name, + eb_local_account *account, int is_public); +static eb_chat_room *ay_irc_make_chat_room_window(char *name, + eb_local_account *account, int is_public, int send_join); +static void ay_irc_accept_invite(eb_local_account *account, void *invitation); +static void ay_irc_decline_invite(eb_local_account *account, void *invitation); +static void eb_irc_read_prefs_config(LList *values); +static LList *eb_irc_write_prefs_config(); +static void irc_connect_cb(AyConnection *con, AyConnectionStatus error, + void *data); void irc_finish_login(eb_local_account *ela); -static irc_callbacks *ay_irc_map_callbacks( void ) ; - +static irc_callbacks *ay_irc_map_callbacks(void); |