Mercurial > pidgin
comparison src/gaimrc.c @ 4512:c5bc145addf9
[gaim-migrate @ 4788]
Removed filter_break.. Made unnecessary by parse_line's processing of escaped chars. Fixes win32 pounce sound paths.
committer: Tailor Script <tailor@pidgin.im>
author | Herman Bloggs <hermanator12002@yahoo.com> |
---|---|
date | Mon, 03 Feb 2003 16:02:50 +0000 |
parents | 3196d9044a45 |
children | 9df99116840a |
comparison
equal
deleted
inserted
replaced
4511:238e1dd2f1a7 | 4512:c5bc145addf9 |
---|---|
196 return 8; | 196 return 8; |
197 } | 197 } |
198 return -1; | 198 return -1; |
199 } | 199 } |
200 | 200 |
201 static void filter_break(char *msg) | |
202 { | |
203 char *c; | |
204 int mc; | |
205 int cc; | |
206 | |
207 c = g_malloc(strlen(msg) + 1); | |
208 strcpy(c, msg); | |
209 | |
210 mc = 0; | |
211 cc = 0; | |
212 while (c[cc] != '\0') { | |
213 if (c[cc] == '\\') { | |
214 cc++; | |
215 msg[mc] = c[cc]; | |
216 } else { | |
217 msg[mc] = c[cc]; | |
218 } | |
219 mc++; | |
220 cc++; | |
221 } | |
222 msg[mc] = 0; | |
223 g_free(c); | |
224 } | |
225 | |
226 static char *escape_text2(const char *msg) | 201 static char *escape_text2(const char *msg) |
227 { | 202 { |
228 char *c, *cpy; | 203 char *c, *cpy; |
229 char *woo; | 204 char *woo; |
230 int cnt = 0; | 205 int cnt = 0; |
278 if (!strcmp(p->option, "message")) { | 253 if (!strcmp(p->option, "message")) { |
279 a = g_new0(struct away_message, 1); | 254 a = g_new0(struct away_message, 1); |
280 | 255 |
281 g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); | 256 g_snprintf(a->name, sizeof(a->name), "%s", p->value[0]); |
282 g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); | 257 g_snprintf(a->message, sizeof(a->message), "%s", p->value[1]); |
283 filter_break(a->name); | |
284 filter_break(a->message); | |
285 away_messages = g_slist_insert_sorted(away_messages, a, sort_awaymsg_list); | 258 away_messages = g_slist_insert_sorted(away_messages, a, sort_awaymsg_list); |
286 } | 259 } |
287 /* auto { time } { default message } */ | 260 /* auto { time } { default message } */ |
288 else if (!strcmp(p->option, "auto")) { | 261 else if (!strcmp(p->option, "auto")) { |
289 auto_away = atoi(p->value[0]); | 262 auto_away = atoi(p->value[0]); |
351 p = parse_line(buf, &parse_buffer); | 324 p = parse_line(buf, &parse_buffer); |
352 if (!strcmp(p->option, "entry")) { | 325 if (!strcmp(p->option, "entry")) { |
353 b = g_new0(struct buddy_pounce, 1); | 326 b = g_new0(struct buddy_pounce, 1); |
354 | 327 |
355 g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]); | 328 g_snprintf(b->name, sizeof(b->name), "%s", p->value[0]); |
356 filter_break(b->name); | |
357 g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]); | 329 g_snprintf(b->message, sizeof(b->message), "%s", p->value[1]); |
358 filter_break(b->message); | |
359 g_snprintf(b->command, sizeof(b->command), "%s", p->value[2]); | 330 g_snprintf(b->command, sizeof(b->command), "%s", p->value[2]); |
360 filter_break(b->command); | |
361 | 331 |
362 b->options = atoi(p->value[3]); | 332 b->options = atoi(p->value[3]); |
363 | 333 |
364 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); | 334 g_snprintf(b->pouncer, sizeof(b->pouncer), "%s", p->value[4]); |
365 filter_break(b->pouncer); | |
366 b->protocol = atoi(p->value[5]); | 335 b->protocol = atoi(p->value[5]); |
367 | 336 |
368 g_snprintf(b->sound, sizeof(b->sound), "%s", p->value[6]); | 337 g_snprintf(b->sound, sizeof(b->sound), "%s", p->value[6]); |
369 filter_break(b->sound); | |
370 | 338 |
371 buddy_pounces = g_list_append(buddy_pounces, b); | 339 buddy_pounces = g_list_append(buddy_pounces, b); |
372 } | 340 } |
373 } | 341 } |
374 } | 342 } |