comparison src/protocols/toc/toc.c @ 5136:381da05cb5ed

[gaim-migrate @ 5500] this started out as simply adding an option to right-click on a jabber buddy and re-request authorization. Then I ended up chasing the disgusting mess of const vs non-const parameters all over gaim. The end result is that you can now right-click on jabber buddies and re-request auth like you can for ICQ. Also, a lot more things are const that should be, I fixed a bug or two, and I cleaned up one of my least favorite functions in gaim (linkify_text). It is now decidedly less evil. committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Tue, 15 Apr 2003 04:18:00 +0000
parents b37d7d09ec83
children fefad67de2c7
comparison
equal deleted inserted replaced
5135:102135caa225 5136:381da05cb5ed
1012 } else { 1012 } else {
1013 debug_printf("don't know what to do with %s\n", c); 1013 debug_printf("don't know what to do with %s\n", c);
1014 } 1014 }
1015 } 1015 }
1016 1016
1017 static int toc_send_im(struct gaim_connection *gc, char *name, char *message, int len, int flags) 1017 static int toc_send_im(struct gaim_connection *gc, const char *name, const char *message, int len, int flags)
1018 { 1018 {
1019 char buf[BUF_LEN * 2]; 1019 char buf[BUF_LEN * 2];
1020 char *tmp = g_malloc(strlen(message) * 4 + 1); /* 4 because \n gets replaced with <BR> */ 1020 char *tmp = g_malloc(strlen(message) * 4 + 1); /* 4 because \n gets replaced with <BR> */
1021 1021
1022 strcpy(tmp, message); 1022 strcpy(tmp, message);
1040 g_snprintf(snd, MSG_LEN, "toc_set_config {%s}", buf); 1040 g_snprintf(snd, MSG_LEN, "toc_set_config {%s}", buf);
1041 sflap_send(gc, snd, -1, TYPE_DATA); 1041 sflap_send(gc, snd, -1, TYPE_DATA);
1042 g_free(buf); 1042 g_free(buf);
1043 } 1043 }
1044 1044
1045 static void toc_get_info(struct gaim_connection *g, char *name) 1045 static void toc_get_info(struct gaim_connection *g, const char *name)
1046 { 1046 {
1047 char buf[BUF_LEN * 2]; 1047 char buf[BUF_LEN * 2];
1048 g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name)); 1048 g_snprintf(buf, MSG_LEN, "toc_get_info %s", normalize(name));
1049 sflap_send(g, buf, -1, TYPE_DATA); 1049 sflap_send(g, buf, -1, TYPE_DATA);
1050 } 1050 }
1051 1051
1052 static void toc_get_dir(struct gaim_connection *g, char *name) 1052 static void toc_get_dir(struct gaim_connection *g, const char *name)
1053 { 1053 {
1054 char buf[BUF_LEN * 2]; 1054 char buf[BUF_LEN * 2];
1055 g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name)); 1055 g_snprintf(buf, MSG_LEN, "toc_get_dir %s", normalize(name));
1056 sflap_send(g, buf, -1, TYPE_DATA); 1056 sflap_send(g, buf, -1, TYPE_DATA);
1057 } 1057 }
1305 *sw = emblems[1]; 1305 *sw = emblems[1];
1306 *nw = emblems[2]; 1306 *nw = emblems[2];
1307 *ne = emblems[3]; 1307 *ne = emblems[3];
1308 } 1308 }
1309 1309
1310 static GList *toc_buddy_menu(struct gaim_connection *gc, char *who) 1310 static GList *toc_buddy_menu(struct gaim_connection *gc, const char *who)
1311 { 1311 {
1312 GList *m = NULL; 1312 GList *m = NULL;
1313 struct proto_buddy_menu *pbm; 1313 struct proto_buddy_menu *pbm;
1314 1314
1315 pbm = g_new0(struct proto_buddy_menu, 1); 1315 pbm = g_new0(struct proto_buddy_menu, 1);