comparison src/protocols/irc/irc.c @ 3063:22c84cbcd5a6

[gaim-migrate @ 3077] A buddy window placement fix by Marc Deslauriers and a compile fix from Benjamin Miller. Thanks guys. Also, an irc fix. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Sat, 16 Mar 2002 20:14:24 +0000
parents 1143524a2eaf
children 793fb2e9d53b
comparison
equal deleted inserted replaced
3062:7fedd5d56b66 3063:22c84cbcd5a6
264 while ((end = strchr(cur, '<'))) { 264 while ((end = strchr(cur, '<'))) {
265 *end = 0; 265 *end = 0;
266 str = g_string_append(str, cur); 266 str = g_string_append(str, cur);
267 cur = ++end; 267 cur = ++end;
268 if (!g_strncasecmp(cur, "B>", 2)) { 268 if (!g_strncasecmp(cur, "B>", 2)) {
269 bold = TRUE; 269 if (!bold) {
270 str = g_string_append_c(str, '\2'); 270 bold = TRUE;
271 str = g_string_append_c(str, '\2');
272 }
271 cur = cur + 2; 273 cur = cur + 2;
272 } else if (!g_strncasecmp(cur, "I>", 2)) { /* use bold for italics too */ 274 } else if (!g_strncasecmp(cur, "I>", 2)) { /* use bold for italics too */
273 italics = TRUE; 275 if (!italics) {
274 str = g_string_append_c(str, '\2'); 276 italics = TRUE;
277 str = g_string_append_c(str, '\2');
278 }
275 cur = cur + 2; 279 cur = cur + 2;
276 } else if (!g_strncasecmp(cur, "U>", 2)) { 280 } else if (!g_strncasecmp(cur, "U>", 2)) {
277 underline = TRUE; 281 if (!underline) {
278 str = g_string_append_c(str, '\37'); 282 underline = TRUE;
283 str = g_string_append_c(str, '\37');
284 }
279 cur = cur + 2; 285 cur = cur + 2;
280 } else if (!g_strncasecmp(cur, "/B>", 3) && bold) { 286 } else if (!g_strncasecmp(cur, "/B>", 3)) {
281 bold = FALSE; 287 if (bold) {
282 str = g_string_append_c(str, '\2'); 288 bold = FALSE;
289 str = g_string_append_c(str, '\2');
290 }
283 cur = cur + 3; 291 cur = cur + 3;
284 } else if (!g_strncasecmp(cur, "/I>", 3) && italics) { 292 } else if (!g_strncasecmp(cur, "/I>", 3)) {
285 bold = FALSE; 293 if (italics) {
286 str = g_string_append_c(str, '\2'); 294 italics = FALSE;
295 str = g_string_append_c(str, '\2');
296 }
287 cur = cur + 3; 297 cur = cur + 3;
288 } else if (!g_strncasecmp(cur, "/U>", 3) && underline) { 298 } else if (!g_strncasecmp(cur, "/U>", 3)) {
289 bold = FALSE; 299 if (underline) {
290 str = g_string_append_c(str, '\37'); 300 underline = FALSE;
301 str = g_string_append_c(str, '\37');
302 }
291 cur = cur + 3; 303 cur = cur + 3;
292 } 304 } else {
305 str = g_string_append_c(str, '<');
306 }
307
293 } 308 }
294 str = g_string_append(str, cur); 309 str = g_string_append(str, cur);
295 return str; 310 return str;
296 } 311 }
297 312