diff -uNr freehoo-3.5.1.orig/src/fh-utils.c freehoo-3.5.1/src/fh-utils.c --- freehoo-3.5.1.orig/src/fh-utils.c 2008-02-19 10:54:24.000000000 -0800 +++ freehoo-3.5.1/src/fh-utils.c 2008-04-27 21:42:48.000000000 -0700 @@ -209,7 +209,7 @@ } char * -parse_color_code (char *string) +parse_color_code (const char *string) { char *parsedstring; int i, j; @@ -240,7 +240,7 @@ } char * -parse_font_tag (char *string) +parse_font_tag (const char *string) { char *parsedstring; int i, j; @@ -274,7 +274,7 @@ } char * -parse_control_characters (char *string) +parse_control_characters (const char *string) { char *parsedstring; int i, j; @@ -294,8 +294,8 @@ } -char * -filter_message (char *message) +const char * +filter_message (const char *message) { char *color_parsedstring = NULL; char *font_parsedstring = NULL; diff -uNr freehoo-3.5.1.orig/src/fh-utils.h freehoo-3.5.1/src/fh-utils.h --- freehoo-3.5.1.orig/src/fh-utils.h 2005-02-16 07:51:32.000000000 -0800 +++ freehoo-3.5.1/src/fh-utils.h 2008-04-27 21:42:56.000000000 -0700 @@ -71,10 +71,10 @@ char *get_token (char **line); char *get_token_with_strdelim (char **line, char *delim); char *get_token_with_strdelim_i (char **line, char *delim); -char *parse_color_code (char *string); -char *parse_font_tag (char *string); -char *parse_control_characters (char *string); -char *filter_message (char *message); +char *parse_color_code (const char *string); +char *parse_font_tag (const char *string); +char *parse_control_characters (const char *string); +const char *filter_message (const char *message); char *old_filter_message (char *message); char *get_utc_time (char *time_secs); char *get_home_directory (void); diff -uNr freehoo-3.5.1.orig/src/yahoo-adapter.c freehoo-3.5.1/src/yahoo-adapter.c --- freehoo-3.5.1.orig/src/yahoo-adapter.c 2008-02-19 10:54:24.000000000 -0800 +++ freehoo-3.5.1/src/yahoo-adapter.c 2008-04-27 21:54:55.000000000 -0700 @@ -59,7 +59,7 @@ } void -set_current_target_buddy (char *current_target_buddy_value, current_target_buddy_mode_t current_target_buddy_mode_value) +set_current_target_buddy (const char *current_target_buddy_value, current_target_buddy_mode_t current_target_buddy_mode_value) { if (current_target_buddy_value) strcpy (current_target_buddy, current_target_buddy_value); @@ -91,7 +91,7 @@ if (get_hook_return () == 1) return; - yahoo_send_im (get_fh_session ()->id, NULL, to, message, 0); + yahoo_send_im (get_fh_session ()->id, NULL, to, message, 0, 0); } /* this function is primarily for scm-procedure. using this function @@ -104,7 +104,7 @@ // it will confuse "session (AUTU-INSERT-MODE). // set_current_target_buddy (to); // AUTO-INSERT-MODE - yahoo_send_im (get_fh_session ()->id, NULL, to, message, 0); + yahoo_send_im (get_fh_session ()->id, NULL, to, message, 0, 0); } void diff -uNr freehoo-3.5.1.orig/src/yahoo-adapter.h freehoo-3.5.1/src/yahoo-adapter.h --- freehoo-3.5.1.orig/src/yahoo-adapter.h 2007-10-14 01:45:11.000000000 -0700 +++ freehoo-3.5.1/src/yahoo-adapter.h 2008-04-27 21:54:44.000000000 -0700 @@ -32,7 +32,7 @@ char *get_received_message_from (void); -void set_current_target_buddy (char *current_target_buddy_value, current_target_buddy_mode_t mode); +void set_current_target_buddy (const char *current_target_buddy_value, current_target_buddy_mode_t mode); char *get_current_target_buddy (current_target_buddy_mode_t *mode); void send_message (char *to, char *message); diff -uNr freehoo-3.5.1.orig/src/yahoo-backend.c freehoo-3.5.1/src/yahoo-backend.c --- freehoo-3.5.1.orig/src/yahoo-backend.c 2008-02-19 10:54:24.000000000 -0800 +++ freehoo-3.5.1/src/yahoo-backend.c 2008-04-27 22:20:14.000000000 -0700 @@ -110,6 +110,12 @@ {0, NULL} }; +void ext_yahoo_got_buddyicon_checksum(int id, const char *me,const char *who, int checksum) { } +void ext_yahoo_got_buddyicon(int id, const char *me, const char *who, const char *url, int checksum) { } +void ext_yahoo_buddyicon_uploaded(int id, const char *url) { } +void ext_yahoo_got_ping(int id, const char *errormsg) { } +void ext_yahoo_got_buddyicon_request(int id, const char *me, const char *who) { } + char * yahoo_status_code (enum yahoo_status s) { @@ -121,7 +127,7 @@ } int -ext_yahoo_log (char *fmt, ...) +ext_yahoo_log (const char *fmt, ...) { // Not implemented right now // va_list ap; @@ -292,8 +298,8 @@ return 1; } -static char * -get_buddy_name (char *yid) +static const char * +get_buddy_name (const char *yid) { YList *b; for (b = buddies; b; b = b->next) @@ -323,8 +329,8 @@ } void -ext_yahoo_got_conf_invite (int id, char *who, char *room, char *msg, - YList * members) +ext_yahoo_got_conf_invite (int id, const char *me, const char *who, + const char *room, const char *msg, YList * members) { conf_room *cr = y_new0 (conf_room, 1); cr->room_name = strdup (room); @@ -342,7 +348,8 @@ } void -ext_yahoo_conf_userdecline (int id, char *who, char *room, char *msg) +ext_yahoo_conf_userdecline (int id, const char *me, const char *who, + const char *room, const char *msg) { YList *l; conf_room *cr = find_conf_room_by_name_and_id (id, room); @@ -365,7 +372,8 @@ } void -ext_yahoo_conf_userjoin (int id, char *who, char *room) +ext_yahoo_conf_userjoin (int id, const char *me, const char *who, + const char *room) { conf_room *cr = find_conf_room_by_name_and_id (id, room); if (cr) @@ -385,7 +393,8 @@ } void -ext_yahoo_conf_userleave (int id, char *who, char *room) +ext_yahoo_conf_userleave (int id, const char *me, const char *who, + const char *room) { YList *l; conf_room *cr = find_conf_room_by_name_and_id (id, room); @@ -407,9 +416,10 @@ } void -ext_yahoo_conf_message (int id, char *who, char *room, char *msg, int utf8) +ext_yahoo_conf_message (int id, const char *me, const char *who, + const char *room, const char *msg, int utf8) { - char *umsg = msg; + char *umsg = (char *)msg; char buffer[4096]; if (utf8) @@ -418,7 +428,7 @@ who = get_buddy_name (who); sprintf (buffer, "[%s] %s", room, msg); - ext_yahoo_got_im (id, who, buffer, 0, 0, utf8); + ext_yahoo_got_im (id, me, who, buffer, 0, 0, utf8); // AUTO-INSERT-MODE set_current_target_buddy (room,current_target_buddy_mode_receive); @@ -453,13 +463,14 @@ } void -ext_yahoo_chat_cat_xml (int id, char *xml) +ext_yahoo_chat_cat_xml (int id, const char *xml) { PRINTF_MESSAGE ("%s\n", xml); } void -ext_yahoo_chat_join (int id, char *room, char *topic, YList * members, int fd) +ext_yahoo_chat_join (int id, const char *me, const char *room, + const char *topic, YList * members, int fd) { PRINTF_MESSAGE ("You have joined the chatroom %s with topic %s\n", room, topic); @@ -481,7 +492,8 @@ } void -ext_yahoo_chat_userjoin (int id, char *room, struct yahoo_chat_member *who) +ext_yahoo_chat_userjoin (int id, const char *me, const char *room, + struct yahoo_chat_member *who) { print_chat_member (who); PRINTF_MESSAGE (" joined the chatroom %s\n", room); @@ -492,16 +504,17 @@ } void -ext_yahoo_chat_userleave (int id, char *room, char *who) +ext_yahoo_chat_userleave (int id, const char *me, const char *room, + const char *who) { PRINTF_MESSAGE ("%s left the chatroom %s\n", who, room); } void -ext_yahoo_chat_message (int id, char *who, char *room, char *msg, - int msgtype, int utf8) +ext_yahoo_chat_message (int id, const char *me, const char *who, + const char *room, const char *msg, int msgtype, int utf8) { - char *umsg = msg; + char *umsg = (char *)msg; char *charpos; if (utf8) @@ -531,8 +544,8 @@ } void -ext_yahoo_status_changed (int id, char *who, int stat, char *msg, - int away) +ext_yahoo_status_changed (int id, const char *who, int stat, const char *msg, + int away, int idle, int mobile) { yahoo_account *ya = NULL; YList *b; @@ -619,13 +632,13 @@ } void -ext_yahoo_got_im (int id, char *who, char *msg, long tm, int stat, int utf8) +ext_yahoo_got_im (int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8) { - char *umsg = msg; + char *umsg = (char *)msg; if (stat == 2) { - PRINTF_MESSAGE ("Error sending message to [%s]", who); + PRINTF_MESSAGE ("Error sending message from [%s] to [%s]", me, who); return; } @@ -656,13 +669,13 @@ strncpy (timestr, ctime ((time_t *) & tm), sizeof (timestr)); timestr[strlen (timestr) - 1] = '\0'; - PRINTF_MESSAGE ("[%s] %s -> %s\r\n", timestr, who, msg); + PRINTF_MESSAGE ("[%s] %s -> %s: %s\r\n", timestr, who, me, msg); } else { if (!strcmp (msg, "")) PRINTF_MESSAGE ("%s", "\a"); - PRINTF_MESSAGE ("%s -> %s\n", who, msg); + PRINTF_MESSAGE ("%s -> %s: %s\n", who, me, msg); } if (utf8) @@ -670,7 +683,7 @@ } void -ext_yahoo_rejected (int id, char *who, char *msg) +ext_yahoo_rejected (int id, const char *who, const char *msg) { PRINTF_MESSAGE ("%s has rejected you%s%s\n", who, (msg ? " with the message:\n" : "."), @@ -678,7 +691,7 @@ } void -ext_yahoo_contact_added (int id, char *myid, char *who, char *msg) +ext_yahoo_contact_added (int id, const char *myid, const char *who, const char *msg) { char buf[1024]; @@ -705,7 +718,7 @@ } void -ext_yahoo_typing_notify (int id, char *who, int stat) +ext_yahoo_typing_notify (int id, const char *me, const char *who, int stat) { /* Disable it for now.... if (stat && do_typing_notify) @@ -716,7 +729,7 @@ } void -ext_yahoo_game_notify (int id, char *who, int stat) +ext_yahoo_game_notify (int id, const char *me, const char *who, int stat) { if (stat) { @@ -729,7 +742,7 @@ } void -ext_yahoo_mail_notify (int id, char *from, char *subj, int cnt) +ext_yahoo_mail_notify (int id, const char *from, const char *subj, int cnt) { char buff[1024] = { 0 }; @@ -809,7 +822,7 @@ } void -ext_yahoo_webcam_viewer (int id, char *who, int connect) +ext_yahoo_webcam_viewer (int id, const char *who, int connect) { switch (connect) { @@ -827,7 +840,7 @@ } void -ext_yahoo_webcam_closed (int id, char *who, int reason) +ext_yahoo_webcam_closed (int id, const char *who, int reason) { switch (reason) { @@ -865,13 +878,13 @@ } void -ext_yahoo_webcam_invite (int id, char *from) +ext_yahoo_webcam_invite (int id, const char *me, const char *from) { PRINTF_MESSAGE ("Got a webcam invitation from %s\n", from); } void -ext_yahoo_webcam_invite_reply (int id, char *from, int accept) +ext_yahoo_webcam_invite_reply (int id, const char *me, const char *from, int accept) { if (accept) { @@ -884,7 +897,7 @@ } void -ext_yahoo_system_message (int id, char *msg) +ext_yahoo_system_message (int id, const char *msg) { if (ignore_system) return; @@ -962,7 +975,7 @@ } void -ext_yahoo_login_response (int id, int succ, char *url) +ext_yahoo_login_response (int id, int succ, const char *url) { char buff[1024]; @@ -1020,7 +1033,7 @@ } void -ext_yahoo_error (int id, char *err, int fatal) +ext_yahoo_error (int id, const char *err, int fatal, int num) { PRINTF_MESSAGE ("Yahoo Error: %s\n", err); /* @@ -1073,7 +1086,7 @@ } int -ext_yahoo_connect (char *host, int port) +ext_yahoo_connect (const char *host, int port) { struct sockaddr_in serv_addr; static struct hostent *server; @@ -1221,7 +1234,7 @@ } int -ext_yahoo_connect_async (int id, char *host, int port, +ext_yahoo_connect_async (int id, const char *host, int port, yahoo_connect_callback callback, void *data) { struct sockaddr_in serv_addr; @@ -1380,8 +1393,8 @@ } void -ext_yahoo_got_file (int id, char *who, char *url, long expires, char *msg, - char *fname, unsigned long fesize) +ext_yahoo_got_file (int id, const char *me, const char *who, const char *url, + long expires, const char *msg, const char *fname, unsigned long fesize) { get_file_geturl_data_t data; @@ -1394,11 +1407,11 @@ PRINTF_MESSAGE ("[%s] has sent a file [%s] (%lu bytes)\n", who, fname,fesize); } - data.who = who; - data.url = url; - data.fname = fname; + data.who = (char *)who; + data.url = (char *)url; + data.fname = (char *)fname; data.fsize = fesize; - data.msg = msg; + data.msg = (char *)msg; yahoo_get_url_handle(id,url,get_file_geturl_callback,&data); } @@ -1407,13 +1420,13 @@ { } void -ext_yahoo_chat_yahoologout (int id) +ext_yahoo_chat_yahoologout (int id, const char *me) { LOG (("got chat logout")); } void -ext_yahoo_chat_yahooerror (int id) +ext_yahoo_chat_yahooerror (int id, const char *me) { LOG (("got chat logout")); } diff -uNr freehoo-3.5.1.orig/src/yahoo-backend.h freehoo-3.5.1/src/yahoo-backend.h --- freehoo-3.5.1.orig/src/yahoo-backend.h 2006-12-03 22:15:31.000000000 -0800 +++ freehoo-3.5.1/src/yahoo-backend.h 2008-04-27 22:06:57.000000000 -0700 @@ -104,7 +104,7 @@ void get_file_geturl_callback(int id, int fd, int error, const char * filename, unsigned long size, void *data); -void ext_yahoo_got_im (int id, char *who, char *msg, long tm, +void ext_yahoo_got_im (int id, const char *me, const char *who, const char *msg, long tm, int stat, int utf8); void register_callbacks (); conf_room *find_conf_room_by_name_and_id (int id, const char * name); @@ -120,4 +120,10 @@ YList *get_fh_conferences (); YList *get_fh_ignores (); +void ext_yahoo_got_buddyicon_checksum(int id, const char *me,const char *who, int checksum); +void ext_yahoo_got_buddyicon(int id, const char *me, const char *who, const char *url, int checksum); +void ext_yahoo_buddyicon_uploaded(int id, const char *url); +void ext_yahoo_got_ping(int id, const char *errormsg); +void ext_yahoo_got_buddyicon_request(int id, const char *me, const char *who); + #endif /* _YAHOO_BACKEND_H */