X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/record-dvb/blobdiff_plain/d5b589063247b727c8609ec453fbfce8903d6f5f..c0833e33c10e0e92bf94fa8f80bee08cf9e764b4:/common.c diff --git a/common.c b/common.c index 8f000fd..825b5ae 100644 --- a/common.c +++ b/common.c @@ -92,3 +92,20 @@ int resolve(struct dvb_host *dvbhost, struct sockaddr_in *server) return 0; } +int is_url(char *string) +{ + char *pos; + + if (!(strlen(string))) + return 0; + + pos = string; + + while(*pos != ':' && *pos != 0) + pos++; + + if (!strncmp("://", pos, 3)) + return 1; + + return 0; +}