Mercurial > pidgin.yaz
diff libpurple/protocols/msn/msn-utils.c @ 16084:a5a831a5f186
Patch cleanups:
* Whitespace consistency
* Comment cleanups
* if (foo) g_free(foo); fixes
* other small stuff, I'm sure
This closes ticket #78.
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Fri, 13 Apr 2007 04:15:14 +0000 |
parents | f2a4b05407d7 |
children | 16bdcffb1c62 |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn-utils.c Fri Apr 13 04:13:24 2007 +0000 +++ b/libpurple/protocols/msn/msn-utils.c Fri Apr 13 04:15:14 2007 +0000 @@ -114,7 +114,8 @@ if (cur && (*(cur = cur + 3) != ';')) { - if(*cur == '1') { + if (*cur == '1') + { /* RTL text was received */ pre = g_string_append(pre, "<SPAN style=\"direction:rtl;text-align:right;\">"); post = g_string_prepend(post, "</SPAN>"); @@ -285,22 +286,20 @@ else if (!g_ascii_strncasecmp(c, "style=\"", 7)) { /* Parse inline CSS attributes */ - char* attributes; + char *attributes; int attr_len = 0; c += 7; while (*(c + attr_len) != '\0' && *(c + attr_len) != '"') attr_len++; - if(*(c + attr_len) == '"') + if (*(c + attr_len) == '"') { char *attr_dir; attributes = g_strndup(c, attr_len); attr_dir = purple_markup_get_css_property(attributes, "direction"); - if(attr_dir && (!strncasecmp(attr_dir, "RTL", 3))) + if (attr_dir && (!strncasecmp(attr_dir, "RTL", 3))) direction = '1'; - if(attr_dir) - g_free(attr_dir); - if(attributes) - g_free(attributes); + g_free(attr_dir); + g_free(attributes); } }