comparison src/protocols/zephyr/zephyr.c @ 3630:9682c0e022c6

[gaim-migrate @ 3753] Yeah this will probably break a lot of shit knowing my luck. But hey, I really don't care what people thnk. committer: Tailor Script <tailor@pidgin.im>
author Rob Flynn <gaim@robflynn.com>
date Fri, 11 Oct 2002 03:14:01 +0000
parents bdd0bebd2d04
children 43e396e94095
comparison
equal deleted inserted replaced
3629:afc5bb164c5a 3630:9682c0e022c6
84 static int last_id = 0; 84 static int last_id = 0;
85 85
86 /* just for debugging 86 /* just for debugging
87 static void handle_unknown(ZNotice_t notice) 87 static void handle_unknown(ZNotice_t notice)
88 { 88 {
89 g_print("z_packet: %s\n", notice.z_packet); 89 debug_printf("z_packet: %s\n", notice.z_packet);
90 g_print("z_version: %s\n", notice.z_version); 90 debug_printf("z_version: %s\n", notice.z_version);
91 g_print("z_kind: %d\n", notice.z_kind); 91 debug_printf("z_kind: %d\n", notice.z_kind);
92 g_print("z_class: %s\n", notice.z_class); 92 debug_printf("z_class: %s\n", notice.z_class);
93 g_print("z_class_inst: %s\n", notice.z_class_inst); 93 debug_printf("z_class_inst: %s\n", notice.z_class_inst);
94 g_print("z_opcode: %s\n", notice.z_opcode); 94 debug_printf("z_opcode: %s\n", notice.z_opcode);
95 g_print("z_sender: %s\n", notice.z_sender); 95 debug_printf("z_sender: %s\n", notice.z_sender);
96 g_print("z_recipient: %s\n", notice.z_recipient); 96 debug_printf("z_recipient: %s\n", notice.z_recipient);
97 g_print("z_message: %s\n", notice.z_message); 97 debug_printf("z_message: %s\n", notice.z_message);
98 g_print("z_message_len: %d\n", notice.z_message_len); 98 debug_printf("z_message_len: %d\n", notice.z_message_len);
99 g_print("\n"); 99 debug_printf("\n");
100 } 100 }
101 */ 101 */
102 102
103 static zephyr_triple *new_triple(const char *c, const char *i, const char *r) 103 static zephyr_triple *new_triple(const char *c, const char *i, const char *r)
104 { 104 {
497 { 497 {
498 FILE *f; 498 FILE *f;
499 gchar *fname; 499 gchar *fname;
500 gchar buff[BUFSIZ]; 500 gchar buff[BUFSIZ];
501 501
502 fname = g_strdup_printf("%s/.zephyr.subs", g_getenv("HOME")); 502 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir());
503 f = fopen(fname, "r"); 503 f = fopen(fname, "r");
504 if (f) { 504 if (f) {
505 char **triple; 505 char **triple;
506 ZSubscription_t sub; 506 ZSubscription_t sub;
507 char *recip; 507 char *recip;
564 static void process_anyone() 564 static void process_anyone()
565 { 565 {
566 FILE *fd; 566 FILE *fd;
567 gchar buff[BUFSIZ], *filename; 567 gchar buff[BUFSIZ], *filename;
568 568
569 filename = g_strconcat(g_get_home_dir(), "/.anyone", NULL); 569 filename = g_strconcat(gaim_home_dir(), "/.anyone", NULL);
570 if ((fd = fopen(filename, "r")) != NULL) { 570 if ((fd = fopen(filename, "r")) != NULL) {
571 while (fgets(buff, BUFSIZ, fd)) { 571 while (fgets(buff, BUFSIZ, fd)) {
572 strip_comments(buff); 572 strip_comments(buff);
573 if (buff[0]) 573 if (buff[0])
574 add_buddy(zgc, "Anyone", buff, buff); 574 add_buddy(zgc, "Anyone", buff, buff);
621 zephyr_triple *zt; 621 zephyr_triple *zt;
622 FILE *fd; 622 FILE *fd;
623 char *fname; 623 char *fname;
624 624
625 char** triple; 625 char** triple;
626 fname = g_strdup_printf("%s/.zephyr.subs", g_get_home_dir()); 626 fname = g_strdup_printf("%s/.zephyr.subs", gaim_home_dir());
627 fd = fopen(fname, "w"); 627 fd = fopen(fname, "w");
628 628
629 if (!fd) { 629 if (!fd) {
630 g_free(fname); 630 g_free(fname);
631 return; 631 return;
658 struct group *g; 658 struct group *g;
659 struct buddy *b; 659 struct buddy *b;
660 char *ptr, *fname, *ptr2; 660 char *ptr, *fname, *ptr2;
661 FILE *fd; 661 FILE *fd;
662 662
663 fname = g_strdup_printf("%s/.anyone", g_get_home_dir()); 663 fname = g_strdup_printf("%s/.anyone", gaim_home_dir());
664 fd = fopen(fname, "w"); 664 fd = fopen(fname, "w");
665 if (!fd) { 665 if (!fd) {
666 g_free(fname); 666 g_free(fname);
667 return; 667 return;
668 } 668 }