diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-08-16 23:25:56 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-09-04 19:34:32 +0800 |
commit | fcbbdfbd18e15b4ee8322a0217cf03a689a5e033 (patch) | |
tree | e16cd2a2279558c6a2bfb6ca39fcbaac4c85ba59 /e-util/e-html-utils.c | |
parent | f78417c48861759d7b0c4535ecd3febe4638a7d3 (diff) | |
download | gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.gz gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.tar.zst gsoc2013-evolution-fcbbdfbd18e15b4ee8322a0217cf03a689a5e033.zip |
Coding style and whitespace cleanup.
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r-- | e-util/e-html-utils.c | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 10e3519865..3a863da096 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -31,7 +31,10 @@ #include "e-html-utils.h" static gchar * -check_size (gchar **buffer, gint *buffer_size, gchar *out, gint len) +check_size (gchar **buffer, + gint *buffer_size, + gchar *out, + gint len) { if (out + len + 1> *buffer + *buffer_size) { gint index = out - *buffer; @@ -72,7 +75,8 @@ static gint special_chars[] = { /* www\.[A-Za-z0-9.-]+(/([^ "|]*[^ ,.!?;:>)\]}`'"|_-])+) */ static gchar * -url_extract (const guchar **text, gboolean full_url) +url_extract (const guchar **text, + gboolean full_url) { const guchar *end = *text, *p; gchar *out; @@ -99,13 +103,15 @@ url_extract (const guchar **text, gboolean full_url) return NULL; } - out = g_strndup ((gchar *)*text, end - *text); + out = g_strndup ((gchar *) * text, end - *text); *text = end; return out; } static gchar * -email_address_extract (const guchar **cur, gchar **out, const guchar *linestart) +email_address_extract (const guchar **cur, + gchar **out, + const guchar *linestart) { const guchar *start, *end, *dot; gchar *addr; @@ -141,7 +147,8 @@ email_address_extract (const guchar **cur, gchar **out, const guchar *linestart) } static gboolean -is_citation (const guchar *c, gboolean saw_citation) +is_citation (const guchar *c, + gboolean saw_citation) { const guchar *p; @@ -218,7 +225,9 @@ is_citation (const guchar *c, gboolean saw_citation) * Returns: a newly-allocated string containing HTML **/ gchar * -e_text_to_html_full (const gchar *input, guint flags, guint32 color) +e_text_to_html_full (const gchar *input, + guint flags, + guint32 color) { const guchar *cur, *next, *linestart; gchar *buffer = NULL; @@ -436,7 +445,8 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) } gchar * -e_text_to_html (const gchar *input, guint flags) +e_text_to_html (const gchar *input, + guint flags) { return e_text_to_html_full (input, flags, 0); } @@ -506,7 +516,8 @@ struct { gint num_url_tests = G_N_ELEMENTS (url_tests); gint -main (gint argc, gchar **argv) +main (gint argc, + gchar **argv) { gint i, errors = 0; gchar *html, *url, *p; |