diff options
author | Tor Lillqvist <tml@novell.com> | 2005-09-28 18:16:34 +0800 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-09-28 18:16:34 +0800 |
commit | b105af8066f642a40230adc5803fd458c0737c39 (patch) | |
tree | 6c874fd4999ce97143aa10e6bf891ef58791858b /e-util/e-html-utils.c | |
parent | bb1c36c74db8723120846cd74207cf4df1c127bc (diff) | |
download | gsoc2013-evolution-b105af8066f642a40230adc5803fd458c0737c39.tar.gz gsoc2013-evolution-b105af8066f642a40230adc5803fd458c0737c39.tar.zst gsoc2013-evolution-b105af8066f642a40230adc5803fd458c0737c39.zip |
Use g_ascii_strncasecmp() instead of strncasecmp(). We are comparing to
2005-09-28 Tor Lillqvist <tml@novell.com>
* e-html-utils.c (e_text_to_html_full): Use g_ascii_strncasecmp()
instead of strncasecmp(). We are comparing to literal ASCII
strings, just casefolding ASCII is enough. Also better for
portability.
svn path=/trunk/; revision=30395
Diffstat (limited to 'e-util/e-html-utils.c')
-rw-r--r-- | e-util/e-html-utils.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 535d772dc4..c79e8f8a92 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -264,22 +264,22 @@ e_text_to_html_full (const char *input, unsigned int flags, guint32 color) (flags & E_TEXT_TO_HTML_CONVERT_URLS)) { char *tmpurl = NULL, *refurl = NULL, *dispurl = NULL; - if (!strncasecmp (cur, "http://", 7) || - !strncasecmp (cur, "https://", 8) || - !strncasecmp (cur, "ftp://", 6) || - !strncasecmp (cur, "nntp://", 7) || - !strncasecmp (cur, "mailto:", 7) || - !strncasecmp (cur, "news:", 5) || - !strncasecmp (cur, "file:", 5) || - !strncasecmp (cur, "callto:", 7) || - !strncasecmp (cur, "h323:", 5) || - !strncasecmp (cur, "webcal:", 7)) { + if (!g_ascii_strncasecmp (cur, "http://", 7) || + !g_ascii_strncasecmp (cur, "https://", 8) || + !g_ascii_strncasecmp (cur, "ftp://", 6) || + !g_ascii_strncasecmp (cur, "nntp://", 7) || + !g_ascii_strncasecmp (cur, "mailto:", 7) || + !g_ascii_strncasecmp (cur, "news:", 5) || + !g_ascii_strncasecmp (cur, "file:", 5) || + !g_ascii_strncasecmp (cur, "callto:", 7) || + !g_ascii_strncasecmp (cur, "h323:", 5) || + !g_ascii_strncasecmp (cur, "webcal:", 7)) { tmpurl = url_extract (&cur, TRUE); if (tmpurl) { refurl = e_text_to_html (tmpurl, 0); dispurl = g_strdup (refurl); } - } else if (!strncasecmp (cur, "www.", 4) && + } else if (!g_ascii_strncasecmp (cur, "www.", 4) && is_url_char (*(cur + 4))) { tmpurl = url_extract (&cur, FALSE); if (tmpurl) { |