Mercurial > pidgin
comparison src/list.c @ 3466:7a3f16a375a5
[gaim-migrate @ 3516]
some patches from some people.
committer: Tailor Script <tailor@pidgin.im>
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Thu, 29 Aug 2002 01:47:15 +0000 |
parents | 48a2e656bdf9 |
children | 9682c0e022c6 |
comparison
equal
deleted
inserted
replaced
3465:ec437d73b2ee | 3466:7a3f16a375a5 |
---|---|
98 | 98 |
99 /* don't flush buddy list to cache in order to be consistent with remove_buddy, | 99 /* don't flush buddy list to cache in order to be consistent with remove_buddy, |
100 * mostly. remove_group is only called from one place, so we'll let it handle it. */ | 100 * mostly. remove_group is only called from one place, so we'll let it handle it. */ |
101 } | 101 } |
102 | 102 |
103 struct buddy *add_buddy(struct gaim_connection *gc, char *group, char *buddy, char *show) | 103 struct buddy *add_buddy(struct gaim_connection *gc, const char *group, const char *buddy, const char *show) |
104 { | 104 { |
105 struct buddy *b; | 105 struct buddy *b; |
106 struct group *g; | 106 struct group *g; |
107 char *good; | 107 const char *good; |
108 | 108 |
109 if (!g_slist_find(connections, gc)) | 109 if (!g_slist_find(connections, gc)) |
110 return NULL; | 110 return NULL; |
111 | 111 |
112 if ((b = find_buddy(gc, buddy)) != NULL) | 112 if ((b = find_buddy(gc, buddy)) != NULL) |
141 ui_add_buddy(gc, g, b); | 141 ui_add_buddy(gc, g, b); |
142 | 142 |
143 return b; | 143 return b; |
144 } | 144 } |
145 | 145 |
146 struct group *add_group(struct gaim_connection *gc, char *group) | 146 struct group *add_group(struct gaim_connection *gc, const char *group) |
147 { | 147 { |
148 struct group *g = find_group(gc, group); | 148 struct group *g = find_group(gc, group); |
149 if (g) | 149 if (g) |
150 return g; | 150 return g; |
151 if (!g_slist_find(connections, gc)) | 151 if (!g_slist_find(connections, gc)) |
163 ui_add_group(gc, g); | 163 ui_add_group(gc, g); |
164 | 164 |
165 return g; | 165 return g; |
166 } | 166 } |
167 | 167 |
168 struct group *find_group(struct gaim_connection *gc, char *group) | 168 struct group *find_group(struct gaim_connection *gc, const char *group) |
169 { | 169 { |
170 struct group *g; | 170 struct group *g; |
171 GSList *grp; | 171 GSList *grp; |
172 GSList *c = connections; | 172 GSList *c = connections; |
173 struct gaim_connection *z; | 173 struct gaim_connection *z; |
207 g_free(grpname); | 207 g_free(grpname); |
208 return NULL; | 208 return NULL; |
209 } | 209 } |
210 } | 210 } |
211 | 211 |
212 struct group *find_group_by_buddy(struct gaim_connection *gc, char *who) | 212 struct group *find_group_by_buddy(struct gaim_connection *gc, const char *who) |
213 { | 213 { |
214 struct group *g; | 214 struct group *g; |
215 struct buddy *b; | 215 struct buddy *b; |
216 GSList *grp; | 216 GSList *grp; |
217 GSList *mem; | 217 GSList *mem; |
271 } | 271 } |
272 return NULL; | 272 return NULL; |
273 } | 273 } |
274 } | 274 } |
275 | 275 |
276 struct buddy *find_buddy(struct gaim_connection *gc, char *who) | 276 struct buddy *find_buddy(struct gaim_connection *gc, const char *who) |
277 { | 277 { |
278 struct group *g; | 278 struct group *g; |
279 struct buddy *b; | 279 struct buddy *b; |
280 GSList *grp; | 280 GSList *grp; |
281 GSList *c; | 281 GSList *c; |
688 } | 688 } |
689 g_free(g_screenname); | 689 g_free(g_screenname); |
690 return ret; | 690 return ret; |
691 } | 691 } |
692 | 692 |
693 void do_import(struct gaim_connection *gc, char *filename) | 693 void do_import(struct gaim_connection *gc, const char *filename) |
694 { | 694 { |
695 GString *buf = NULL; | 695 GString *buf = NULL; |
696 char first[64]; | 696 char first[64]; |
697 char path[PATHSIZE]; | 697 char path[PATHSIZE]; |
698 int len; | 698 int len; |