Mercurial > pidgin
comparison plugins/zephyr/zephyr.c @ 1940:8de58cd2892f
[gaim-migrate @ 1950]
don't mind this. it just makes my patch for GTK2 smaller.
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Fri, 01 Jun 2001 22:45:45 +0000 |
parents | b012f6b9095b |
children |
comparison
equal
deleted
inserted
replaced
1939:0ec62ca82a8a | 1940:8de58cd2892f |
---|---|
27 #include "config.h" | 27 #include "config.h" |
28 #endif | 28 #endif |
29 | 29 |
30 #include <gtk/gtk.h> | 30 #include <gtk/gtk.h> |
31 #include <string.h> | 31 #include <string.h> |
32 #include <stdlib.h> | |
32 #include "gaim.h" | 33 #include "gaim.h" |
33 #include "prpl.h" | 34 #include "prpl.h" |
34 #include "zephyr/zephyr.h" | 35 #include "zephyr/zephyr.h" |
36 | |
37 extern Code_t ZGetLocations(ZLocations_t *, int *); | |
38 extern Code_t ZSetLocation(char *); | |
39 extern Code_t ZUnsetLocation(); | |
35 | 40 |
36 typedef struct _zframe zframe; | 41 typedef struct _zframe zframe; |
37 typedef struct _zephyr_triple zephyr_triple; | 42 typedef struct _zephyr_triple zephyr_triple; |
38 | 43 |
39 /* struct I need for zephyr_to_html */ | 44 /* struct I need for zephyr_to_html */ |
111 g_print("z_message_len: %d\n", notice.z_message_len); | 116 g_print("z_message_len: %d\n", notice.z_message_len); |
112 g_print("\n"); | 117 g_print("\n"); |
113 } | 118 } |
114 */ | 119 */ |
115 | 120 |
116 static zephyr_triple *new_triple(char *c, char *i, char *r) | 121 static zephyr_triple *new_triple(const char *c, const char *i, const char *r) |
117 { | 122 { |
118 zephyr_triple *zt; | 123 zephyr_triple *zt; |
119 zt = g_new0(zephyr_triple, 1); | 124 zt = g_new0(zephyr_triple, 1); |
120 zt->class = g_strdup(c); | 125 zt->class = g_strdup(c); |
121 zt->instance = g_strdup(i); | 126 zt->instance = g_strdup(i); |
691 static void zephyr_chat_send(struct gaim_connection *gc, int id, char *im) | 696 static void zephyr_chat_send(struct gaim_connection *gc, int id, char *im) |
692 { | 697 { |
693 ZNotice_t notice; | 698 ZNotice_t notice; |
694 zephyr_triple *zt; | 699 zephyr_triple *zt; |
695 char *buf; | 700 char *buf; |
696 char *sig; | 701 const char *sig; |
697 | 702 |
698 zt = find_sub_by_id(id); | 703 zt = find_sub_by_id(id); |
699 if (!zt) | 704 if (!zt) |
700 /* this should never happen. */ | 705 /* this should never happen. */ |
701 return; | 706 return; |
728 } | 733 } |
729 | 734 |
730 static void zephyr_send_im(struct gaim_connection *gc, char *who, char *im, int away) { | 735 static void zephyr_send_im(struct gaim_connection *gc, char *who, char *im, int away) { |
731 ZNotice_t notice; | 736 ZNotice_t notice; |
732 char *buf; | 737 char *buf; |
733 char *sig; | 738 const char *sig; |
734 | 739 |
735 if (away) | 740 if (away) |
736 sig = "Automated reply:"; | 741 sig = "Automated reply:"; |
737 else { | 742 else { |
738 sig = ZGetVariable("zwrite-signature"); | 743 sig = ZGetVariable("zwrite-signature"); |
870 | 875 |
871 static void zephyr_join_chat(struct gaim_connection *gc, int id, char *nm) | 876 static void zephyr_join_chat(struct gaim_connection *gc, int id, char *nm) |
872 { | 877 { |
873 ZSubscription_t sub; | 878 ZSubscription_t sub; |
874 zephyr_triple *zt1, *zt2; | 879 zephyr_triple *zt1, *zt2; |
875 char *classname; | 880 const char *classname; |
876 char *instname; | 881 const char *instname; |
877 char *recip; | 882 const char *recip; |
878 char **splitted; | 883 char **splitted; |
879 | 884 |
880 if (!nm) { | 885 if (!nm) { |
881 splitted = NULL; | 886 splitted = NULL; |
882 classname = gtk_entry_get_text(GTK_ENTRY(class_entry)); | 887 classname = gtk_entry_get_text(GTK_ENTRY(class_entry)); |