Commit 81dca6c8 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

better logic for figuring out something is a URI


Tue Oct 23 10:51:24 2007  Jiri (George) Lebl <jirka@5z.com>

	* src/gnome-genius.c: better logic for figuring out something is a
	  URI



svn path=/trunk/; revision=573
parent 23b49073
Tue Oct 23 10:51:24 2007 Jiri (George) Lebl <jirka@5z.com>
* src/gnome-genius.c: better logic for figuring out something is a
URI
Mon Oct 22 21:39:42 2007 Jiri (George) Lebl <jirka@5z.com>
* src/gnome-genius.c: recognize uris on the command line
......
......@@ -3056,12 +3056,22 @@ is_uri (const char *s)
const char *p;
if ( ! s)
return FALSE;
for (p = s; (*p >= 'a' && *p <= 'z') || (*p >= 'A' && *p <= 'Z'); p++)
;
if (p == s)
return FALSE;
if (*p == ':')
return TRUE;
if (*p == ':') {
GnomeVFSURI *uri =
gnome_vfs_uri_new (s);
if (uri != NULL) {
gnome_vfs_uri_unref (uri);
return TRUE;
} else {
return FALSE;
}
}
return FALSE;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment